コード例 #1
0
ファイル: Service1.svc.cs プロジェクト: El-tigree/New
        public string register(RegisterUser regUser)
        {
            var userstable = new userController();

            var check = userstable.getTable().FirstOrDefault<user>(c => c.user_email.Equals(regUser.email));

            if (check != null)
            {
                return "Email Already Registered";
            }

            user newUser = new user { user_fname = regUser.fname, user_email = regUser.email, user_sname = regUser.lname, user_password = regUser.password, usertype_id = 2, user_id = userstable.getTable().Count() };

            userstable.addRecord(newUser);
            return "Registered";
        }