public StatisticsEntry GetById(int id) { using (var context = new MillionaireContext()) { return(context.Set <StatisticsEntry>().Where(s => s.QuestionID == id).FirstOrDefault()); } }
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()); } }
public IList <User> GetAll() { using (var context = new MillionaireContext()) { return(context.Set <User>().ToList()); } }