public IHttpActionResult Get() { try { return(Ok(context.Get())); } catch (Exception ex) { return(Content(HttpStatusCode.NotModified, ex.Message)); } }
public async Task <IActionResult> Get() { try { return(Ok(await context.Get())); } catch (Exception ex) { return(BadRequest(new ErrorMessage(ex.Message))); } }