示例#1
0
文件: Users.cs 项目: janiukjf/API
        public string GetUser()
        {
            AlexDBDataContext db = new AlexDBDataContext();
            user u = new user();
            u = db.users.Where(x => (x.username.Equals(this.username) || x.email.Equals(username)) && x.password.Equals(password)).FirstOrDefault<API.user>();

            if (u == null || u.userID == 0) {
                throw new Exception("User not found");
            }
            return JsonConvert.SerializeObject(u);
        }
示例#2
0
 partial void Updateuser(user instance);
示例#3
0
 partial void Deleteuser(user instance);
示例#4
0
 partial void Insertuser(user instance);