public static Feature ToFeature(this EntityGeo entity) { var type = entity.GetType(); var attributes = type .GetProperties() .Where(x => x.PropertyType != typeof(Geometry) && (x.Name != "CreatedAt" && x.Name != "UpdatedAt")) .ToDictionary(key => key.Name.Camelize(), value => value.GetValue(entity)); return new Feature(entity.Geom, new AttributesTable(attributes)) { BoundingBox = entity.Geom.Envelope.EnvelopeInternal }; }