예제 #1
0
        public IHttpActionResult DeleteEmployee(int id)
        {
            var emp = _employee.GetEmpByIdAtBL(id);

            if (emp == null)
            {
                return(NotFound());
            }
            _employee.DeleteEmpAtBL(emp);
            return(Ok(emp));
        }
예제 #2
0
        public void TestDeleteEmp()
        {
            var empName = "Hemant.Mohapatra";
            var emp     = _employee.GetEmpByNameBL(empName);

            _employee.DeleteEmpAtBL(emp);

            var empX = _employee.GetEmpByNameBL(empName);

            Assert.IsNull(empX);
        }