public UsersViewModel GetAllUsers(RoleManager <IdentityRole> roleManager, string roleToSearch, UserManager <IdentityUser> userManager) { var customers = _repository.GetAll(); var result = _identity.GetAllUsers(customers, roleManager, roleToSearch, userManager); var model = result.Result; return(model); }
public MenuPage CheckBonusPoints(HttpRequest request, MenuPage menumodel) { var customerid = _cache.GetCustomerIDCache(request); menumodel.Customer = _repositoryCustomer.GetAll().FirstOrDefault(r => r.KundId == customerid); if (Convert.ToInt32(menumodel.Customer.BonusPoints) >= 100 && menumodel.Matratteradded.Count != 0) { menumodel.Matratteradded.OrderBy(r => r.Pris); menumodel.Matratteradded[0].Pris = 0; menumodel.Matratteradded.OrderBy(r => r.Pris); } return(menumodel); }
public Kund CheckUserName(Kund customer) { return(_repository.GetAll().FirstOrDefault(r => r.AnvandarNamn == customer.AnvandarNamn)); }