예제 #1
0
        // GET: Region
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new RegionService(userId);
            var model   = service.GetAllRegions();

            return(View(model));
        }
예제 #2
0
        public ActionResult Index()
        {
            var beers = BeerService.GetPopularBeers().Distinct().ToList();

            ViewBag.Count = beers.Count();
            ViewBag.Beers = beers;
            var regions = RegionService.GetAllRegions();
            var dict    = regions.ToDictionary(region => region.Id, region => region.Name);

            ViewBag.SelectList = new SelectList(dict, "Key", "Value");
            var model = new UserModel();

            return(View(model));
        }
 public async Task <List <RegionDto> > GetRegion()
 {
     return(await regionService.GetAllRegions());
 }
예제 #4
0
 public List <RegionModel> Get()
 {
     return(RegionService.GetAllRegions(dbConn));
 }