Exemplo n.º 1
0
        private PlotRecord InsertPlot(int tenantId, string name, string wkt, int srid)
        {
            var rec = new PlotRecord
            {
                TenantId = tenantId,
                Name = name,
                Wkt = wkt,
                SRID = srid,
            };

            rec.Id = this.repository.InsertPlot(rec);
            return rec;
        }
Exemplo n.º 2
0
        public virtual int InsertPlot(PlotRecord rec)
        {
            var geom   = ValidSqlGeometryFromWkt(rec.Wkt, rec.SRID);
            var geog   = ValidSqlGeographyFromWkt(rec.Wkt, rec.SRID);
            var @param = new
            {
                rec.TenantId,
                rec.Name,
                Geometry  = geom,
                Geography = geog,
                rec.SRID,
            };

            return(this.session.Insert(
                       nameof(this.InsertPlot),
                       @param));
        }