Skip to main content
All docs
V24.1
.NET 6.0+

XAF0030: Use the generic XPCollection<T> class, GetCollection<T> method, and AssociationAttribute without the type parameter to declare your association property

Severity: Warning

Use the generic XPCollection<T> class, GetCollection<T> method, and AssociationAttribute without the type parameter to declare your association property. Current declarations with non-generic XPCollection (.NET 1.0 style) are not recommended and cause issues in Blazor and Web API Service apps.

Examples

Invalid Code

[Association(typeof(SomeXpoType))]
public XPCollection Contacts {
    get { return GetCollection("Contacts"); }
}

Valid Code

[Association]
public XPCollection<SomeXpoType> Contacts {
    get { return GetCollection<SomeXpoType>("Contacts"); }
}
// OR
[Association("SomeName")]
public XPCollection<SomeXpoType> Contacts {
    get { return GetCollection<SomeXpoType>("Contacts"); }
}