public UserRepository(ScrumTaskBoardXPDBContext context) { _context = context; }
public ProjectRepository(ScrumTaskBoardXPDBContext context) { _context = context; }
public void Add(T table) { using var context = new ScrumTaskBoardXPDBContext(); context.Set <T>().Add(table); context.SaveChanges(); }
public T GetById(int id) { using var context = new ScrumTaskBoardXPDBContext(); return(context.Set <T>().Find(id)); }
public List <T> GetAll() { using var context = new ScrumTaskBoardXPDBContext(); return(context.Set <T>().ToList()); }
public void Delete(T table) { using var context = new ScrumTaskBoardXPDBContext(); context.Set <T>().Remove(table); context.SaveChanges(); }
public TaskTodoRepository(ScrumTaskBoardXPDBContext context) { _context = context; }