Esempio n. 1
0
 public void Delete(TaskCategory taskCategory)
 {
     var originalRecord = base.EbalitDBContext.TaskCategories.Find(taskCategory.Id);
     if (originalRecord != null)
     {
         base.EbalitDBContext.TaskCategories.Remove(originalRecord);
         base.EbalitDBContext.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Update(TaskCategory taskCategory)
 {
     var originalRecord = base.EbalitDBContext.TaskCategories.Find(taskCategory.Id);
     if (originalRecord != null)
     {
         base.EbalitDBContext.Entry(originalRecord).CurrentValues.SetValues(taskCategory);
         base.EbalitDBContext.SaveChanges();
     }
 }
Esempio n. 3
0
 public int Create(TaskCategory taskCategory)
 {
     base.EbalitDBContext.TaskCategories.Add(taskCategory);
     base.EbalitDBContext.SaveChanges();
     return taskCategory.Id;
 }