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