public async Task <IActionResult> Delete(int companyId) { try { if (!(await _company.CheckCompanyExist(companyId))) { return(BadRequest(Messages.CompanyNotExist)); } return(Ok(await _company.Delete(companyId))); } catch (Exception ex) { return(BadRequest(Messages.GeneralError)); } }
public IActionResult Delete(int id) { User currentAdmin = HttpContext.Session.Get <User>("currentUser"); try { companyBLL.Delete(id); this._logger.LogInformation($"AdminID : {currentAdmin.ID} is updated CompanyID : {id}."); } catch (Exception) { throw; } return(View("Index")); }
public IActionResult Delete(int id) { companyBLL.Delete(id); return(Ok()); }