diff --git a/docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs b/docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs index 5197be21..d78bf874 100644 --- a/docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs +++ b/docs/demo/src/WTA.Shared/Attributes/OneToManyAttribute.cs @@ -1,11 +1,14 @@ namespace WTA.Shared.Attributes; -public class OneToManyAttribute +[AttributeUsage(AttributeTargets.Property)] +public class OneToManyAttribute : Attribute { - public Type Type { get; set; } = null; - public OneToManyAttribute(string property) + public Type Type { get; set; } = null!; + public string? Property { get; } + + public OneToManyAttribute(string? property = null) { - this.Type=typeof(TEntity); - this.Property=Property; + this.Type = typeof(TEntity); + this.Property = property; } }