/// <summary> /// Authenticate User with Email And Password /// </summary> /// <param name="Email">User Email</param> /// <param name="Password">User Password</param> /// <returns>User Data with Role Inof with User ID</returns> public static Login_ResponseModel LoginUserWithEmailAndPassword(string Email, string Password) { //TODO: //Step 1: Fetch User With given Email var responeUserData = UserQuery.FetchUserWithEmail(Email); //Step 2: If Data found match the password if (responeUserData != null) { if (responeUserData.Password.Equals(Password)) { //Step 3: Return User Role with UserID return(new Login_ResponseModel() { RoleName = "Organizer", UserID = responeUserData.ID }); } } return(null); }