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