I am using DataSvcUtil and I wanted to generate a custom namespace for my generated class but this does not seem to be allowed. Is there a reason for this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
DataSvcUtil.exe is a fairly thin wrapper over the System.Data.Services.Design.EntityClassGenerator class, which has support for using a custom namespace prefix, but not arbitrarily customizing the namespaces. I don’t know of a specific reason this support was not provided, there may not have been a compelling enough scenario for it at the time.
If you need more flexible code generation, I strongly suggest you take a look at the T4 template the team released some time ago. It is very likely that code generation for WCF Data Services will more towards using T4 rather than DataSvcUtil/EntityClassGenerator.