Browse Source

update

pull/1/head
wanggang 1 year ago
parent
commit
3ce79acb02
  1. 11
      docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs

11
docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs

@ -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…
Cancel
Save