Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
 public async Task <List <RegionDto> > GetRegion()
 {
     return(await regionService.GetAllRegions());
 }
Ejemplo n.º 4
0
 public List <RegionModel> Get()
 {
     return(RegionService.GetAllRegions(dbConn));
 }