Click here to Skip to main content
15,891,951 members

Comments by USAFHokie80 (Top 1 by date)

USAFHokie80 10-Aug-15 11:17am View    
I get an exception with the above:

An unhandled exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll

Additional information: The properties expression 'x => new Address() {AddressID = x.AddressID}' is not valid.
The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'.
When specifying multiple properties use an anonymous type: C#: 't => new { t.MyProperty1, t.MyProperty2 }'
VB.Net: 'Function(t) New With { t.MyProperty1, t.MyProperty2 }'.

That's the problem... I'm not sure how to do this with an anonymous type.