public int Insert(TaskDomain.Task entity) { _db.Tasks.Add(entity); return(_db.SaveChanges()); }
public int Update(TaskDomain.Task entityToUpdate) { _db.Entry(entityToUpdate).State = EntityState.Modified; return(_db.SaveChanges()); }
public void Delete(TaskDomain.Task entityToDelete) { _db.Tasks.Remove(entityToDelete); var result = _db.SaveChanges(); }