public Sweden ValidateTown(TownViewModel town, TownsContext context) { Sweden sweTown = context.Sweden /* Use for Eager Loading commented because we r Lazy! * .Include(i => i.EmployeeTerritories) * .ThenInclude(i => i.Territory) **/ .Where(s => s.Town.StartsWith(town.Name.ToLower())) .FirstOrDefault(); return(sweTown); }
public ShowTown(TownViewModel Model) { }