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
Trying to specify the HasKey on the Id and a Property of complex type on that same object. Considering it is just a normal column there shouldn't be an issue, I think, to be able to specify the above. However, I get the following error:
The exception 'The expression 'p => new <>f__AnonymousType0`2(EventId = p.EventId, Address = p.EmailAddress.Address)' is not a valid member access expression. The expression should represent a simple property or field access: 't => t.MyProperty'. When specifying multiple properties or fields, use an anonymous type: 't => new { t.MyProperty, t.MyField }'. (Parameter 'memberAccessExpression')' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Process terminated with exit code 1
As an alternative is there a standard way of providing the columns by string ?
The text was updated successfully, but these errors were encountered:
michelbieleveld
changed the title
HasIndex(p => new { p.Id, p.ComplexType.Property } does not seem to work
HasKey(p => new { p.Id, p.ComplexType.Property }) does not seem to work
Nov 20, 2023
Trying to specify the HasKey on the Id and a Property of complex type on that same object. Considering it is just a normal column there shouldn't be an issue, I think, to be able to specify the above. However, I get the following error:
The exception 'The expression 'p => new <>f__AnonymousType0`2(EventId = p.EventId, Address = p.EmailAddress.Address)' is not a valid member access expression. The expression should represent a simple property or field access: 't => t.MyProperty'. When specifying multiple properties or fields, use an anonymous type: 't => new { t.MyProperty, t.MyField }'. (Parameter 'memberAccessExpression')' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Process terminated with exit code 1
As an alternative is there a standard way of providing the columns by string ?
The text was updated successfully, but these errors were encountered: