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(); }
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; }
public void Delete(CustomerShare model) { var target = Find(model.ID); db.Remove<CustomerShare>(target); db.Commit(); }
public void Create(CustomerShare model) { db.Add<CustomerShare>(model); db.Commit(); }