Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <UserModel> GetUserDetails()
        {
            List <UserModel> userModelList = null;

            using (TaskManagerEntities db = new TaskManagerEntities())
            {
                var userList = db.GET_USER_DETAILS();

                if (userList != null)
                {
                    userModelList = new List <UserModel>();

                    foreach (var item in userList)
                    {
                        userModelList.Add(new UserModel()
                        {
                            User_ID     = item.User_ID,
                            First_Name  = item.First_Name,
                            Last_Name   = item.Last_Name,
                            Employee_ID = item.Employee_ID
                        });
                    }
                }

                return(userModelList);
            }
        }