Files
Database-Attribute_System/Database-Attribute_System/Attributes/DbPrimaryKey.cs
Railz 83dc8d6045 Added foreignKeyFieldName for foreignKeys
Added ResolveForeignKeys to ClassActions
Changed ResolveByPrimaryKey to GetByPrimaryKey
Added todo's
2019-04-08 22:21:48 +02:00

24 lines
856 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace eu.railduction.netcore.dll.Database_Attribute_System.Attributes
{
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public class DbPrimaryKey : Attribute
{
public Type _classType;
public string _attributeName;
/// <summary>
/// Marks variable as primaryKey fo current class
/// </summary>
/// <param name="dbAttributeName">Name of database-attribute (case-sensitivity is determined from database-attribute-settings) ['null' if the same as field-name]</param>
public DbPrimaryKey(string attributeName = null)
{
this._attributeName = attributeName; // Todo: Automatic resolving of name if it is null (?)
}
}
}