Skip to main content
All docs
V24.2
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

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

#Valid Code

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