public void PopulatePickupLocation(ApplicationDbContext db)
        {
            if (this.Grower != null)
            {
                ListingsRepository repo = new ListingsRepository(db);

                if (String.IsNullOrWhiteSpace(this.SavedLocationId) == false)
                {
                    IEnumerable <PickupLocation> allLocs = repo.GetAllPickupLocations(this.Grower.Id);
                    PickupLocation = allLocs.Where(l => l.id == int.Parse(this.SavedLocationId)).FirstOrDefault();
                }
            }
            else
            {
                PickupLocation = null;
            }
        }
        public void PopulatePickupLocations(ApplicationDbContext db)
        {
            if (this.Grower != null)
            {
                ListingsRepository repo = new ListingsRepository(db);

                IEnumerable <PickupLocation> allLocs   = repo.GetAllPickupLocations(this.Grower.Id);
                IEnumerable <SelectListItem> listItems = allLocs.Select(pl => new SelectListItem()
                {
                    Value = pl.id.ToString(), Text = pl.name
                });
                PickupLocations = listItems;
            }
            else
            {
                PickupLocations = new List <SelectListItem>();
            }
        }