Ejemplo n.º 1
0
 partial void DeleteCategory(Category instance);
Ejemplo n.º 2
0
 partial void InsertCategory(Category instance);
Ejemplo n.º 3
0
 partial void UpdateCategory(Category instance);
Ejemplo n.º 4
0
 /// <summary>
 /// Adds category and submit changes
 /// </summary>
 public Category Save(Category model)
 {
     if(model.Id < 1)
     {
         throw new NotImplementedException("ProductDataContext is removed, use EF!");
         //_dataContext.Categories.InsertOnSubmit(model);
     }else
     {
         throw new NotImplementedException("ProductDataContext is removed, use EF!");
         //Category entity = _dataContext.Categories.SingleOrDefault(x => x.Id.Equals(model.Id));
         //entity.Name = model.Name;
         //entity.OrganizationId = model.OrganizationId;
         //entity.ParentId = model.ParentId;
         //entity.StatusId = model.StatusId;
         //entity.CategoryTypeId = model.CategoryTypeId;
     }
     _dataContext.SubmitChanges();
     return model;
 }