EF Code First CTP5 - Using the name of the property as column name for foreign key?

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.

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.

Thanks for sharing Diego, I have been encountering exactly the same problem. – Ian Nelson Feb 23 '11 at 12:38.

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.

I have already tried with MapKey (which is awfully confusing compared to FNH or ConfORM, btw), but I get a "Sequence contains more than one matching element" exception from the bowels of EF when using the context. – Diego Mijelshon Feb 15 '11 at 21:15 See added info. – Diego Mijelshon Feb 15 '11 at 21:19 First, that's clearly a bug in the CTP, so you should probably report it.

Even if you configure incorrectly, you should get a meaningful error. Second, I've always seen WithMany with an expression. Have you tried that overload?

– Craig Stuntz Feb 15 '11 at 21:36 Yes, I have, same error. Do you know where the bugtracker is? – Diego Mijelshon Feb 15 '11 at 22:06 2 The EF bug portal is here – Craig Stuntz Feb 15 '11 at 22:32.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions