Modify DomainService code?
How can one modify DomainService code without the custom code being overwritten?
Is there a way to put the custom code in a seper开发者_JAVA技巧ate class file?
Thanks.
Are you talking about the insert/update/delete generated code? You are supposed to modify and expand this code for your specific needs. View this code as a suggested starting point on which to build your custom functionality.
If you are talking about the classes generated by the data model, then consider expanding the partial classes with metadata: http://www.nikhilk.net/RIA-Services-Fluent-Metadata-API.aspx
For a more detailed sample, see the Book Club RIA Services Application tutorial (code and videos) by Nikhil Kothari.
精彩评论