예제 #1
0
 /// <summary>
 /// 保存自定义查询(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="custmerQueryEntity">实体</param>
 /// <returns></returns>
 public void SaveEntity(string keyValue, CustmerQueryEntity custmerQueryEntity)
 {
     try
     {
         if (!string.IsNullOrEmpty(keyValue))
         {
             custmerQueryEntity.Modify(keyValue);
             this.BaseRepository().Update(custmerQueryEntity);
         }
         else
         {
             custmerQueryEntity.Create();
             this.BaseRepository().Insert(custmerQueryEntity);
         }
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }