public ActionResult <string> Delete(int id) { try { return(Ok(_contractorsService.Delete(id))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
public ActionResult <Contractor> Delete(int id) { try { return(Ok(_service.Delete(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <string> Delete(int id) { try { return(Ok(_cs.Delete(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Contractor> Delete(int id) { try { return(Ok(_serv.Delete(id))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
public ActionResult <bool> Delete(int id) { try { return(Ok(_service.Delete(id))); } catch (System.Exception error) { return(BadRequest(error.Message)); } }
public async Task <ActionResult <Contractor> > Delete(int id) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); return(Ok(_service.Delete(id, userInfo.Id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <ActionResult <Contractor> > Delete(int id) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); //NOTE send userinfo.id so you can validate they are the creator of the original return(Ok(_service.Delete(id, userInfo.Id))); } catch (Exception e) { return(BadRequest(e.Message)); } }