public IHttpActionResult Delete(int id) { if (!_companyServices.IsOwner(id, UserId)) { return(Content(HttpStatusCode.Forbidden, "This is not your company")); } _companyServices.Delete(id); return(Ok(new { data = "OK" })); }
public async Task <IActionResult> Delete([FromRoute] Guid id) { await _companyServices.Delete(id); return(NoContent()); }
public IActionResult Delete(int id) { ICompanyServices.Delete(id); return(RedirectToAction("Index")); }