public void InsertOrUpdate(CategoryVO category)
 {
     if(category.CategoryID == default(int))
     {
         _context.SetAdd(category);
     }
     else
     {
         _context.SetModified(category);
     }
 }
 public void InsertOrUpdateGraph(CategoryVO customerGraph)
 {
     if (customerGraph.State == State.Added)
     {
         _context.Categories.Add(customerGraph);
     }
     else
     {
         _context.Categories.Add(customerGraph);
         _context.ApplyStateChanges();
     }
 }
 public Boolean ManageSave(CategoryVO category)
 {  
     return _categoryBL.Save(category);
 }
Пример #4
0
 public bool Save(CategoryVO vo)
 {
     _categoryAccessor.Repo.InsertOrUpdate(vo);
     return _categoryAccessor.Save();           
 }
 public Boolean ManageDelete(CategoryVO category)
 {
     return _categoryBL.Remove(category.CategoryID);
 }