Skip to content

Interface Expression not translated #89

@DG4ever

Description

@DG4ever

My Entity QualityDataPart implements an interface IQualityDataPart which has a property Type (string).
In order to save storage this text is stored in a different Entity QualityDataPartInfo
Now I want to map the property from the different Entity:

public class QualityDataPart : IQualityDataPart
{
    ...some other props...

    public virtual QualityDataPartInfo PartInfo { get; init; } = new QualityDataPartInfo();
    [Projectable] public string Type => PartInfo.Type;
 }

The user should be able to query an expression via the exposed interface IQualityDataPart

Hovever this will not transalte the Type property to PartInfo.Type.

This won't work:

Expression<Func<IQualityDataPart, bool>> test = p => p.Type == "Test";
return await qualityDataParts.Where(test).ToListAsync();

This is working as expected:

Expression<Func<QualityDataPart, bool>> test = p => p.Type == "Test";
return await qualityDataParts.Where(test).ToListAsync();

Might this be a bug or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions