public long RegisterUser(UserTable user, UserLoginTable userLogin) { if (!UserLoginRepository.CheckEmail(userLogin.email)) { return(-1); } long ID = UR.Createuser(user); userLogin.userID = ID; return(UserLoginRepository.AddLoginAccount(userLogin)); }
public long CheckCredentials(string username, string password) { if (!UserLoginRepository.CheckEmail(username)) { UserLoginTable userLoginTable = new UserLoginTable { email = username, password = password }; return(UserLoginRepository.CheckPassword(userLoginTable)); } return(-1); }