Ends in:
7 DAYS
20 HRS
53 MIN
15 SEC
Ends in:
7 D
20 H
53 M
15 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 20, 2024, 13:06