}//18000 10000 28000+4000 18000+14000 36000 public bool Update(CustomerAddress cusomerAddress) { var dbSession = Common.DbFactory.CreateDbSession(); dbSession.Context.ModifyEntity(cusomerAddress.CreateQSmartObject()); dbSession.Context.SaveChange(); return(true); }
public bool Add(CustomerAddress cusomerAddress) { cusomerAddress.CreateDate = DateTime.Now; var dbSession = Common.DbFactory.CreateDbSession(); dbSession.Context.InsertEntity(cusomerAddress.CreateQSmartObject()); dbSession.Context.SaveChange(); //实现业务逻辑和展现层 业务分离 return(true); }//18000 10000 28000+4000 18000+14000 36000