public RoundResult GetById(int id) { using (var dbContext = new LottoContext()) { return(dbContext.RoundResults.FirstOrDefault(x => x.Id == id)); } }
public IEnumerable <User> GetAll() { using (var dbContext = new LottoContext()) { return(dbContext.Users.ToList()); } }
public IEnumerable <RoundResult> GetAll() { using (var dbContext = new LottoContext()) { return(dbContext.RoundResults.ToList()); } }
public User GetById(int id) { using (var dbContext = new LottoContext()) { return(dbContext.Users.FirstOrDefault(x => x.Id == id)); } }
public IEnumerable <Ticket> GetAll() { using (var dbContext = new LottoContext()) { return(dbContext.Tickets.ToList()); } }
public void Update(RoundResult entity) { using (var dbContext = new LottoContext()) { dbContext.RoundResults.Update(entity); dbContext.SaveChanges(); } }
public void Update(User entity) { using (var dbContext = new LottoContext()) { dbContext.Users.Update(entity); dbContext.SaveChanges(); } }
public void Delete(User entity) { using (var dbContext = new LottoContext()) { dbContext.Users.Remove(entity); dbContext.SaveChanges(); } }
public void Update(Ticket entity) { using (var dbContext = new LottoContext()) { dbContext.Tickets.Update(entity); dbContext.SaveChanges(); } }
public DrawsRepo(LottoContext lottoContext) { _lottoContext = lottoContext; }
public LoteriaController(LottoContext context) { _context = context; }