Ejemplo n.º 1
0
        public ActionResult Index(int?page)
        {
            var skip   = page == null ? 0 : (page.Value * PageSize) - 1;
            var latlng = _profileReader.GetLatLong(User.TryGetPrincipal().UserId);
            var model  = Mapper.Map <DinnerListDto, DinnerListModel>(_dinnerReader.GetDinnerList(latlng.Lat, latlng.Lng, skip, PageSize));

            model.Lat  = latlng.Lat;
            model.Long = latlng.Lng;
            return(View("DinnerList", model));
        }