public IHttpActionResult DeleteCompany(long id) { try { _companyAppService.Delete(id, AuthHelper.GetCurrentUserId()); return(Ok("Company Deleted")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Delete([FromRoute] Guid id) { await appService.Delete(new DeleteCompanyCommand(id)); return(NoContent()); }
public async Task <ActionResult> Delete(int companyId) { await _companyAppService.Delete(companyId, userName); return(RedirectToAction("Index")); }
public async Task Delete(Guid id) { var commandDelete = new DeleteCompanyCommand(id); await appService.Delete(commandDelete); }