public List <Question> GetAllQuestions() { using (var scriptsContext = new ScriptsContext()) { var queryQuestions = scriptsContext.Questions //.Where(t => t.Active == true) .AsEnumerable() .Select(t => new Question() { Id = t.Id, Name = t.Name, Description = t.Description, Verbiage = t.Verbiage, VerbiageSpanish = t.VerbiageSpanish, Active = t.Active }).ToList(); return(queryQuestions); } }
public QuoteService(ScriptsContext context, IRandomService randomService) { this._context = context; this._randomService = randomService; }
protected Repository(ScriptsContext ctx) { _ctx = ctx; }
public QuoteService(ScriptsContext context, IRandomService randomService) { _context = context; _randomService = randomService; list = _context.Quotes.ToList(); }