public OrderViewModel GetDataForOrderCreate(string userId) { var user = userRepo.GetUser(userId); var model = new OrderViewModel { Locations = griddingRepo.GetLocations().Where(l => l.IsActive).ToList(), Estates = griddingRepo.GetEstates().ToList(), Products = orderRepo.GetFFProducts(), ISPProducts = ispRepo.GetProducts().Where(u => u.ISPId == user.ISPId).ToList(), Discounts = ispRepo.GetEstateDiscounts(userId) }; return(model); }
public List <Estate> GetEstates() { return(griddingRepo.GetEstates().ToList()); }