public async Task <long> Save(ReaperDTO entity) { try { return(await _reaperDAL.Save(_mapper.Map <Reaper>(entity))); } catch (Exception ex) { return(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); } }
public async Task <IActionResult> Save(ReaperDTO model) => Ok(await _reaperDSL.Save(model));