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