You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many of the classes in my project have a PK composed of an int and a string property. I would like to move those two properties to their own class and use that class as the key on my entities:
The properties expression 'x => new <>f__AnonymousType0`4(DataProviderID = x.CategoryNativeID.DataProviderID, NativeID = x.CategoryNativeID.NativeID, SeriesDPID = x.SeriesNativeID.DataProviderID, SeriesNativeID = x.SeriesNativeID.NativeID)' is not valid. The expression should represent a simple property access: 't => t.MyProperty'. When specifying multiple properties use an anonymous type: 't => new { t.MyProperty1, t.MyProperty2 }'.
Parameter name: propertyAccessExpression
Is there a way to accomplish this?
The text was updated successfully, but these errors were encountered:
sam-wheat
changed the title
Cannot create key from inherited class
Cannot create composite key from class
Jul 4, 2019
Many of the classes in my project have a PK composed of an int and a string property. I would like to move those two properties to their own class and use that class as the key on my entities:
Identifier:
Entities:
The entity I am having a problem with is
SeriesCategory
which simply joinsSeries
andCategory
.I try to define the PK as shown below. I need to name the properties because there are duplicate names:
I get this error:
Is there a way to accomplish this?
The text was updated successfully, but these errors were encountered: