Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ShowTown(TownViewModel Model)
 {
 }