Пример #1
0
        // GET: Properties
        public ActionResult Index()
        {
            List <PropTableViewModel> lst;

            using (GeolygonEntities db = new GeolygonEntities())
            {
                lst = (from d in db.properties
                       select new PropTableViewModel
                {
                    Id = d.id,
                    Name = d.property_name,
                    Address = d.property_address
                }).ToList();
            }
            return(View(lst));
        }
Пример #2
0
        public ActionResult Polygon()
        {
            List <PolygonList> lst;

            using (GeolygonEntities db = new GeolygonEntities())
            {
                lst = (from d in db.polygons
                       select new PolygonList
                {
                    Id = d.id,
                    Prop_Id = d.properties_id,
                    Identifier = d.identifier,
                    Lat = d.latitud,
                    Long = d.longitude
                }).ToList();
            }
            return(View(lst));
        }