Search code examples
entity-framework-4ef4-code-only

Register generic type in DbContext EF4 CTP5


in EF4 CTP4 we had RegisterSet function to generically register entity in ModelBuilder. We used Configurations.Add() to register the mapping for entities. How to achieve this EF4 CTP 5


Solution

  • I found the answer to problem. They have exposed ModelBuilder.Entity().{Configuration} like Property/IsRequired and all for simple types. For complex entities there are functions like ComplexTypes.