Esempio 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));
            }
        }
Esempio n. 2
0
        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);
 }