Exemplo n.º 1
0
        public IHttpActionResult DeleteCompany(long id)
        {
            try
            {
                _companyAppService.Delete(id, AuthHelper.GetCurrentUserId());

                return(Ok("Company Deleted"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Delete([FromRoute] Guid id)
        {
            await appService.Delete(new DeleteCompanyCommand(id));

            return(NoContent());
        }
Exemplo n.º 3
0
        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);
 }