public IActionResult GetAll() { try { var data = _permission.GetAll(); return(Json(data)); } catch (Exception ex) { _logger.LogCritical($"Exception while get list of items.", ex); return(StatusCode(500, $"Exception while get list of items. {ex.Message}")); } }