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