Ejemplo n.º 1
0
 /// <summary>
 /// 更新一条TMerchantType记录
 /// </summary>
 /// <param name="dto">TMerchantType实体</param>
 /// <returns>是否更新成功</returns>
 public bool Update(TMerchantTypeDTO dto)
 {
     try
     {
         if (_repository.Update(dto.ProjectedAs <T_MerchantType>()) >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 新增一条TMerchantType记录
 /// </summary>
 /// <param name="dto">TMerchantType实体</param>
 /// <returns>是否新增成功</returns>
 public bool Add(TMerchantTypeDTO dto)
 {
     try
     {
         var entity = dto.ProjectedAs <T_MerchantType>();
         if (_repository.Insert(entity) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }