Example #1
0
 public void Update(CustomerShare model)
 {
     var entity = Find(model.ID);
     db.Attach<CustomerShare>(entity);
     entity.MemberID=model.MemberID;
     entity.AddUser=model.AddUser;
     entity.AddTime=model.AddTime;
     entity.CompanyID=model.CompanyID;
     entity.Status=model.Status;
     db.Commit();
 }
Example #2
0
 public CustomerShare Create(CustomerShareViewModel model)
 {
     var entity = new CustomerShare();
     entity.MemberID=model.MemberID;
     entity.AddUser=model.AddUser;
     entity.AddTime=model.AddTime;
     entity.CompanyID=model.CompanyID;
     entity.Status=model.Status;
     db.Add<CustomerShare>(entity);
     db.Commit();
     return entity;
 }
Example #3
0
 public void Delete(CustomerShare model)
 {
     var target = Find(model.ID);
     db.Remove<CustomerShare>(target);
     db.Commit();
 }
Example #4
0
 public void Create(CustomerShare model)
 {
     db.Add<CustomerShare>(model);
     db.Commit();
 }