Beispiel #1
0
 public Task<int> ReportLostPerson(ILostPerson lp)
 {
     try
     {
         return lostRepository.AddAsync(lp);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
 /// <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;
     }
 }
Beispiel #3
0
 /// <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;
     }
 }
Beispiel #4
0
 public Task<int> UpdateLostPerson(ILostPerson lp)
 {
     return lostRepository.UpdateAsync(lp);
 }