Given the following model:
public class Foo
{
public int Id { get; set;}
public Bar TheBar { get; set; }
}
public class Bar
{
public int Id { ge
The error was caused by a bug in CTP5. If the Id property was defined in a base class (which is not shown in the code above because I didn't think it was related), it breaks.
I solved it by defining a base interface, but keeping the Id in each class.
You want the MapKey
method in the fluent interface.
Alternately, if you do this throughout your model, CTP 5 has pluggable conventions, although this is, AFAIK, not well-documented yet.