public virtual async Task <IActionResult> GetAllItems() { try { var services = await _businessLogicService.GetAllItems().ConfigureAwait(false); return(Ok(JsonConvert.SerializeObject(services))); } catch (Exception exception) { return(StatusCode(500, exception.Message)); } }
public virtual IActionResult GetAllItems() { try { Debug.WriteLine($"Try to get all {typeof(TBL).Name} items"); var items = _businessLogicService.GetAllItems(); return(Ok(JsonConvert.SerializeObject(items))); } catch (Exception exception) { return(StatusCode(500, exception.Message)); } }