forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNpgsqlUserTypes.cs
More file actions
25 lines (23 loc) · 863 Bytes
/
NpgsqlUserTypes.cs
File metadata and controls
25 lines (23 loc) · 863 Bytes
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
using System;
namespace NpgsqlTypes
{
/// <summary>
/// Indicates that this property or field correspond to a PostgreSQL field with the specified name
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public class PgNameAttribute : Attribute
{
/// <summary>
/// The name of PostgreSQL field that corresponds to this CLR property or field
/// </summary>
public string PgName { get; private set; }
/// <summary>
/// Indicates that this property or field correspond to a PostgreSQL field with the specified name
/// </summary>
/// <param name="pgName">The name of PostgreSQL field that corresponds to this CLR property or field</param>
public PgNameAttribute(string pgName)
{
PgName = pgName;
}
}
}