public Task GetirUsersById(int id) { using (var context = new ScrumTaskBoardContext()) { return(context.Tasks.Include(x => x.User).Where(x => x.Id == id).FirstOrDefault()); } }
public List <Task> GetirTumTablolarla() { using (var context = new ScrumTaskBoardContext()) { return(context.Tasks.Include(x => x.User).Include(x => x.Durum).ToList()); } }
public Entity GetirIdile(int id) { using (var context = new ScrumTaskBoardContext()) { return(context.Set <Entity>().Find(id)); } }
public List <Entity> GetirHepsi() { using (var context = new ScrumTaskBoardContext()) { return(context.Set <Entity>().ToList()); } }
public Entity GetirByFilter(Expression <Func <Entity, bool> > filter) { using (var context = new ScrumTaskBoardContext()) { return(context.Set <Entity>().FirstOrDefault(filter)); } }
public List <TaskState> GetirTumTablolarla(string durumName) { using (var context = new ScrumTaskBoardContext()) { return(context.TaskStates.Include(x => x.Durum).Include(x => x.User).Include(x => x.Task) .Where(x => x.Durum.Name == durumName).ToList()); } }
public void Sil(Entity entity) { using (var context = new ScrumTaskBoardContext()) { context.Entry(entity).State = Microsoft.EntityFrameworkCore.EntityState.Deleted; context.SaveChanges(); } }