Exemplo n.º 1
0
        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;
 }
Exemplo n.º 3
0
 protected Repository(ScriptsContext ctx)
 {
     _ctx = ctx;
 }
Exemplo n.º 4
0
 public QuoteService(ScriptsContext context, IRandomService randomService)
 {
     _context       = context;
     _randomService = randomService;
     list           = _context.Quotes.ToList();
 }