public Domain.Client.Dtos.Resource Update(Domain.Client.Dtos.Resource entity)
 {
     try
     {
         Domain.Models.Resource ormEntity = _mapper.Map <Domain.Client.Dtos.Resource, Domain.Models.Resource>(entity);
         ormEntity = _repository.Update(ormEntity);
         entity    = _mapper.Map <Domain.Models.Resource, Domain.Client.Dtos.Resource>(ormEntity);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.ToString());
         this.ErrorMessage = ex.ToString();
     }
     return(entity);
 }
 public Domain.Client.Dtos.Resource Read(int id, string includeProperties = null)
 {
     Domain.Client.Dtos.Resource toReturn = null;
     try
     {
         Domain.Models.Resource ormEntity = _repository.Read(id, includeProperties);
         toReturn = _mapper.Map <Domain.Models.Resource, Domain.Client.Dtos.Resource>(ormEntity);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.ToString());
         this.ErrorMessage = ex.ToString();
     }
     return(toReturn);
 }