Example #1
0
        public ActionResult Delete(int?ID)
        {
            if (ID == null)
            {
                return(BadRequest("The Request of Employee is Wrong"));
            }
            Employees employees = EmployeesRepostiry.Get(ID.Value);

            if (employees != null)
            {
                return(NotFound("The Employees not found"));
            }
            EmployeesRepostiry.Delete(employees);
            EmployeesRepostiry.SaveAll();
            return(NoContent());
        }