Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static User Connexion(String login, String MotDePasse) {
- Database bdd = new Database();
- User us = bdd._Context.UserSet.FirstOrDefault(u => u.login == login);
- if (us == null)
- throw new Exception("Nom d'utilisateur erroné");
- if (us.password != MotDePasse)
- throw new Exception("Mot de passe erroné");
- else
- return us;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement