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?
My Entity
QualityDataPartimplements an interfaceIQualityDataPartwhich has a propertyType(string).In order to save storage this text is stored in a different Entity
QualityDataPartInfoNow I want to map the property from the different Entity:
The user should be able to query an expression via the exposed interface
IQualityDataPartHovever this will not transalte the
Typeproperty toPartInfo.Type.This won't work:
This is working as expected:
Might this be a bug or am I doing something wrong?