Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public async Task <IActionResult> GetColors() { try { var colors = await _colorRepository.GetColorsAsync(); var results = Mapper.Map <IEnumerable <ColorDto> >(colors); return(Ok(results)); } catch (Exception e) { _logger.LogCritical($"GET {Route} - {e.GetType().Name} - {e.Message} - {e.StackTrace}"); return(StatusCode(500, "An error ocurred in server")); } }