Exemplo n.º 1
0
 public IActionResult GetAllStorages()
 {
     try
     {
         var storages = _repository.GetAllStorages();
         return(Ok(Mapper.Map <IEnumerable <StorageViewModel> >(storages)));
     }
     catch (Exception ex)
     {
         _logger.LogError("Failed to load storages : {0}", ex);
     }
     return(BadRequest("Failed to load storages"));
 }