Exemplo n.º 1
0
        // List Clubs
        public IActionResult ListDistricts()
        {
            var districtsViewModel = new DistrictsViewModel()
            {
                Districts = _context.District.ToList()
            };

            return(View(districtsViewModel));
        }
Exemplo n.º 2
0
        public DistrictsViewModel GetDistricts()
        {
            DistrictsViewModel vm = new DistrictsViewModel();

            repository.Execute(session =>
            {
                var districts = session.Query <Entities.Lookup.District>().ToList();
                vm.Districts  = AutoMapper.Mapper.Map <List <Cherries.Models.Lookup.District> >(districts);
            });
            return(vm);
        }
Exemplo n.º 3
0
 public DistrictsPage()
 {
     InitializeComponent();
     BindingContext = _viewModel = new DistrictsViewModel();
 }