I'm having trouble figuring out why my code isn't working. When the field is empty, it just loads continuously. Also, when the field IS occupied adding something for the fourth time replicates the error. Any help?
private async Task<City> RetrieveCity(string name)
{
// Instantiate return variable
City city = null;
// Find id in ProductLines table
var cities = await db.Cities.Where(c => c.CityName.Equals(name)).ToListAsync();
city = cities.First();
return city;
}