galaeth-draft/Galaeth.Core/Attributes/EntityAnnotation/ColumnMappingAttribute.cs

23 lines
597 B
C#
Raw Normal View History

2024-11-17 10:31:01 +01:00
namespace Galaeth.Core.Attributes.EntityAnnotation;
/// <summary>
/// Define the column name this property relates to.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ColumnMappingAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="ColumnMappingAttribute"/> class.
/// </summary>
/// <param name="name">Database column name.</param>
public ColumnMappingAttribute(string name)
{
Name = name;
}
/// <summary>
/// Database table column name.
/// </summary>
public string Name { get; }
}