EasyData
EasyData copied to clipboard
Show data for shadow foreign key properties
When we define a model class like this
public class Culture
{
public string Id { get; set; }
public Language Language { get; set; }
. . . .
}
Entity Framework automatically adds the LanguageId
property to the Culture
entity.
Currently, we just skip these properties (both on metadata loading and on data fetch) but it would be more correct to show them (unless the user skips them on purpose) and to retrieve the data from the corresponding fields.
It could be problematic because during adding or editing we cannot set navigation property via existing mapping. It will require special mapping for shadow attributes if we will show them.
It could be problematic because during adding or editing we cannot set navigation property via existing mapping. It will require special mapping for shadow attributes if we will show them.
Actually, adding or editing will be much easier than getting data: https://docs.microsoft.com/en-us/ef/core/modeling/shadow-properties#accessing-shadow-properties