예제 #1
0
        public List <employee> getData(string searchKey)
        {
            var             result       = _employeeDBEntities.STP_GetAllEmployeesSearch(searchKey).ToList();
            List <employee> employeelist = new List <employee>();

            foreach (var item in result)
            {
                employee empObj = new employee();
                empObj.EmpId       = item.EmpId;
                empObj.EmpName     = item.EmpName;
                empObj.Age         = item.Age;
                empObj.Salary      = item.Salary;
                empObj.EmpLocation = item.EmpLocation;
                employeelist.Add(empObj);
            }
            return(employeelist);
        }