public StatisticsEntry GetById(int id)
 {
     using (var context = new MillionaireContext())
     {
         return(context.Set <StatisticsEntry>().Where(s => s.QuestionID == id).FirstOrDefault());
     }
 }
Esempio n. 2
0
 public User GetById(int id)
 {
     using (var context = new MillionaireContext())
     {
         return(context.Set <User>().Where(u => u.UserID == id).FirstOrDefault());
     }
 }
 public IList <StatisticsEntry> GetAll()
 {
     using (var context = new MillionaireContext())
     {
         return(context.Set <StatisticsEntry>().ToList());
     }
 }
Esempio n. 4
0
 public IList <User> GetAll()
 {
     using (var context = new MillionaireContext())
     {
         return(context.Set <User>().ToList());
     }
 }