public Task<int> ReportLostPerson(ILostPerson lp) { try { return lostRepository.AddAsync(lp); } catch (Exception ex) { throw ex; } }
/// <summary> /// Delete lost person /// </summary> public async Task<int> DeleteAsync(ILostPerson lp) { try { return await Repository.DeleteAsync<LostPersonEntity>(AutoMapper.Mapper.Map<LostPersonEntity>(lp)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Add lost person /// </summary> public async Task<int> AddAsync(ILostPerson lp) { try { lp.Id = Guid.NewGuid(); return await Repository.AddAsync<LostPersonEntity>(AutoMapper.Mapper.Map<LostPersonEntity>(lp)); //Destination LostPersonEntity; Source ILostPerson } catch (Exception ex) { throw ex; } }
public Task<int> UpdateLostPerson(ILostPerson lp) { return lostRepository.UpdateAsync(lp); }