public override bool ValidateUser(string username, string password) { UserBs objBs = new UserBs(); int count = objBs.GetAll().Count(x => x.UserEmail.Equals(username) && x.Password.Equals(password)); return(count != 0); }
internal void CreateUserIfDoesNotExist(string UserEmail, UserBs userBs) { if (userBs.GetAll().Where(x => x.UserEmail == UserEmail).Count() == 0) { userBs.Insert(new tbl_User() { UserEmail = UserEmail, Role = "U", Password = "******", ConfirmPassword = "******" }); } }
public override string[] GetRolesForUser(string username) { UserBs objBs = new UserBs(); return(new string[] { objBs.GetAll().Where(x => x.UserEmail.Equals(username)).FirstOrDefault().Role }); }