예제 #1
0
 public async Task <long> Save(ReaperDTO entity)
 {
     try
     {
         return(await _reaperDAL.Save(_mapper.Map <Reaper>(entity)));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #2
0
 public async Task <long> Save(ReaperDTO entity)
 {
     try
     {
         if (entity.Id > 0)
         {
             await _accountingSharedDSL.UpdateAccountName(entity.Id, entity.HeadName);
         }
         return(await _reaperDAL.Save(_mapper.Map <Reaper>(entity)));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
예제 #3
0
 public async Task <IActionResult> Save(ReaperDTO model) => Ok(await _reaperDSL.Save(model));