public IActionResult FinalDelete(int id, string slug)
        {
            var employee = EmployeeServices.GetEmployeeById(id);

            if (employee == null || employee.Name != slug)
            {
                return(NotFound());
            }

            var dto = new FinalDeleteNameDTO()
            {
                Name = employee.Name
            };

            this.EmployeeServices.RemoveEmployee(employee);

            return(this.View(dto));
        }
Пример #2
0
        public IActionResult FinalDelete(int id, string slug)
        {
            var intern = InternServices.GetInternById(id);

            if (intern == null || intern.Name != slug)
            {
                return(NotFound());
            }

            var dto = new FinalDeleteNameDTO()
            {
                Name = intern.Name
            };

            this.InternServices.RemoveIntern(intern);

            return(this.View(dto));
        }
        public IActionResult FinalDelete(int id, string slug)
        {
            var company = CompanyServices.GetCompanyById(id);

            if (company == null || company.Name != slug)
            {
                return(NotFound());
            }

            var dto = new FinalDeleteNameDTO()
            {
                Name = company.Name
            };

            this.CompanyServices.RemoveCompany(company);

            return(this.View(dto));
        }