Is there a method/tool/technique for develop开发者_开发知识库ing with Microsoft CRM 4.0 that keeps the developer from having to use strings for entity names and attributes?
We've built our own model classes and store entity names, attribute names, and picklist values there. It's just a bunch of enums and constant strings, but at least it's using a centralized constant so we can know when something breaks.
We use our own mapper which translates objects into dynamic entities. This is all configured by attributes on the classes or types. You can find a project which uses a similar approach here: http://xrm.codeplex.com
On the other hand, you have the possibility to create early bound types. See Code Generation Using the CrmSvcUtil Tool.
精彩评论