Wiki Link: [discussion:2903]
automatically generate partial classes 

Jan 29 2010 at 9:19 AM

I would like EFPocoClassGen.exe to automatically generate partial classes so that fields can be extended with DataAnnotation attributes for example.

For example, the following command will generate classes for my adapter, but they are not partial.
EFPocoClassGen.exe /mode:PocoClasses /incsdl:MyEFModel.csdl /outputfile:MyEntities.cs

Thank you.

Feb 25 2010 at 3:37 PM
AFAIK everything generated by EFPocoClassGen is partial. I get all partials when I do this:
EFPocoClassGen.exe /verbose /incsdl:MyEFModel.csdl /outputfile:PocoAdapters.cs /ref:..\MyPocos.dll /map:MyProduct.EntityFrameworkNamespace=MyProduct.Pocos

Maybe you have to include a reference to your pocos? Or do you expect to get pocos generated?
If so, I think that's a misunderstanding. You have to create them youself if I'm not mistaken. Compile your poco assembly and point to the assembly using the /ref: argument, and map your namespace to the entity framework namespace (in your EF model)


Page view tracker