public void Edit(Task task) { if (task != null) { db.Entry(task).State = EntityState.Modified; } }
public void Add(int categoryId, Task task) { var category = db.Categories.Find(categoryId); if (category != null) { if (task != null) { category.Tasks.Add(task); } } }
public void Edit(Task task) { repository.Edit(task); }
public void Add(int categoryId, Task task) { repository.Add(categoryId, task); }