Example #1
0
        /// <summary>
        /// 获取指定ID 的用户
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <returns>用户实体</returns>
        public User_tb GetUser(int userID)
        {
            User_tb user = new User_tb();

            user = museEntity.User_tb.Where(u => u.UserID == userID).FirstOrDefault();
            return(user);
        }
Example #2
0
        /// <summary>
        /// 获取指定账号的用户
        /// </summary>
        /// <param name="userAccount">用户账号</param>
        /// <returns>用户实体</returns>
        public User_tb GetUser(string userAccount)
        {
            User_tb user = museEntity.User_tb.Where(u => u.UserAccount == userAccount).FirstOrDefault();

            return(user);
        }
Example #3
0
 /// <summary>
 /// 获取指定ID 的用户
 /// </summary>
 /// <param name="userID">用户ID</param>
 /// <returns>用户实体</returns>
 public User_tb GetUser(int userID)
 {
     User_tb user = new User_tb();
     user = museEntity.User_tb.Where(u => u.UserID == userID).FirstOrDefault();
     return user;
 }