Ends in:
4 DAYS
5 HRS
5 MIN
1 SEC
Ends in:
4 D
5 H
5 M
1 S

Activities of "nailgoksel"

Hi!,

I would like to discriminate some of the properties of controller parameter. For example, assume that I have a controller parameter called ClassX

public class ClassX
{
    public DetailDefinition Definition { get; set; }
    public IDetails Details { get; set; }
}

Typically I want Details to be differ based on the information of "Definition" property. Using this class in ABP, we get deserialization errors since Details property is an Interface type. Looking .NET documentations it seems this approach can be done using "Type Discrimination" practices like defined in https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism?pivots=dotnet-7-0#polymorphic-type-discriminators.

Since my scenario needs to be done at controller level, I want to know whether above approach is possible or not.

  • ABP Framework version: 7.x
Showing 1 to 1 of 1 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 28, 2024, 07:27