Exemple #1
0
        public void TestEmpById()
        {
            var empName = "Abhijeet Trivedi";
            var emp     = _employee.GetEmpByIdAtBL(20008);

            Assert.AreEqual(empName, emp.EmployeeName);
        }
Exemple #2
0
        public IHttpActionResult GetEmployeeById(string employeeId)
        {
            var objEmp = new EmployeeViewModel();
            int Id     = Convert.ToInt32(employeeId);

            try
            {
                objEmp = _employee.GetEmpByIdAtBL(Id);
                if (objEmp == null)
                {
                    return(NotFound());
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Ok(objEmp));
        }