You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
626 B
22 lines
626 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Apewer.Source
|
|
{
|
|
|
|
/// <summary>表示此属性在支持的数据库中是自增字段。</summary>
|
|
[AttributeUsage(AttributeTargets.Property)]
|
|
public sealed class IncrementalAttribute : Attribute
|
|
{
|
|
|
|
/// <summary>从 <see cref="IncrementalAttribute"/> 到 Boolean 的隐式转换,判断 <see cref="IncrementalAttribute"/> 有效。</summary>
|
|
public static implicit operator bool(IncrementalAttribute instance)
|
|
{
|
|
if (instance == null) return false;
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
}
|