Exemplo n.º 1
0
 public void Update(CustomerCate model)
 {
     var entity = Find(model.ID);
     db.Attach<CustomerCate>(entity);
     entity.CateName=model.CateName;
     entity.PID=model.PID;
     entity.Code=model.Code;
     entity.Level=model.Level;
     entity.OrderIndex=model.OrderIndex;
     db.Commit();
 }
Exemplo n.º 2
0
 public CustomerCate Create(CustomerCateViewModel model)
 {
     var entity = new CustomerCate();
     entity.CateName=model.CateName;
     entity.PID=model.PID;
     entity.Code=model.Code;
     entity.Level=model.Level;
     entity.OrderIndex=model.OrderIndex;
     db.Add<CustomerCate>(entity);
     db.Commit();
     return entity;
 }
Exemplo n.º 3
0
 public void Delete(CustomerCate model)
 {
     var target = Find(model.ID);
     db.Remove<CustomerCate>(target);
     db.Commit();
 }
Exemplo n.º 4
0
 public void Create(CustomerCate model)
 {
     db.Add<CustomerCate>(model);
     db.Commit();
 }