wanggang
1 year ago
1 changed files with 14 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
namespace WTA.Shared.Attributes; |
|||
|
|||
[AttributeUsage(AttributeTargets.Property)] |
|||
public class OneToOneAttribute<TEntity> : Attribute, ITypeAttribute |
|||
{ |
|||
public Type Type { get; set; } = null!; |
|||
public string? Property { get; } |
|||
|
|||
public OneToOneAttribute(string? property = null) |
|||
{ |
|||
this.Type = typeof(TEntity); |
|||
this.Property = property; |
|||
} |
|||
} |
Loading…
Reference in new issue