In March of this year SP1 of WCF RIA Services was released together with SP1 of Visual Studio 2010. Soon this was followed by a new version of the WCF RIA Services Toolkit. Microsoft has changed a few things in SP1 which makes it possible for you to implement you own code generation classes that can manipulate the client code generation of RIA Services entities, contexts, … In my opinion this is a great new feature which is very powerful when you are building your own Silverlight framework. So in this article I will describe how the code generation in RIA services SP1 works and I will demonstrate some scenarios and ideas were customizing the generated code is a nice technique to extend your own framework.
- WCF RIA Services code generation
- Setup of demo application
- Installation of Toolkit
- T4 Code generation classes
- Adding interfaces to the generated entities
- Adding attributes to the generated entities
- Using derived data annotation attributes
- Adding XML comments to the generated entities
- Using derived classes for entities, domain contexts and the web context
- Implementing your own logic in the derived classes

