Reputation: 2983
Im using the entity framework 4.1 and have followed a tutorial to fake the dbcontext to mock and do unit tests. Everything works as expected with this. ive amended the original dbcontext to return idbset's however when i recreated my model it overwrote this. This is to be expected i suppose but wondered whether there is away i can stop this happening. Any ideas?
Upvotes: 0
Views: 536
Reputation: 108975
Probably the easiest approach is to replace the T4 templates that do the code generation with your own – copy the default templates into your project and adapt them to generate the code you want.
MSDN has an introduction: http://msdn.microsoft.com/en-us/data/gg558520
Upvotes: 2