I need to insert a common set of code in Get method of all the entities generated by the RIA Domain Service wizard. Is it possible to override Domain Service wizard’s code generation so I can insert that code automatically?
Thanks,
Ankur
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.
You can definitely modify and edit (or even write your own) T4 templates that are responsible for the code generation.. something along the lines of these two links:
T4 Code Generator for WCF RIA Services
Using T4 to change the way RIA services work
Furthermore, you can check the T4 template for RIA services (server side) from the WCF RIA Services Contrib project on CodePlex that allows you to modify your GET methods as follows: