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?