-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathGeographyAttribute.cs
More file actions
30 lines (27 loc) · 1.46 KB
/
GeographyAttribute.cs
File metadata and controls
30 lines (27 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//-----------------------------------------------------------------------------
// <copyright file="GeographyAttribute.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------
using Microsoft.AspNetCore.OData.NetTopologySuite.Conventions;
using Microsoft.OData.Edm;
using Geometry = NetTopologySuite.Geometries.Geometry;
namespace Microsoft.AspNetCore.OData.NetTopologySuite.Attributes;
/// <summary>
/// Marks a property or CLR type so that NetTopologySuite geometry values are modeled as Edm geography types.
/// </summary>
/// <remarks>
/// - When applied to a property whose CLR type derives from <see cref="Geometry"/>,
/// the property is mapped to the corresponding <see cref="EdmPrimitiveTypeKind"/> in the Edm.Geography* family
/// (for example, Point → GeographyPoint).
/// - When applied to a class, all properties on the type whose CLR types derive from
/// <see cref="Geometry"/> are treated as Edm.Geography*.
/// The behavior is enforced by the conventions
/// <see cref="GeographyAttributeEdmPropertyConvention"/> and
/// <see cref="GeographyAttributeEdmTypeConvention"/>.
/// </remarks>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
public class GeographyAttribute : Attribute
{
}