Skip to content
Michael Lisby edited this page Oct 12, 2021 · 5 revisions

XrmContext

XrmContext generates early-bound .NET classes which represent the entity model of the given Dynamics CRM instance.

XrmContext can be installed and updated via NuGet

PM> Install-Package Delegate.XrmContext

What is it?

It is very similar to that of CrmSvcUtil, but has several new features that help you code better and more reliably, and generates files that takes up less space.

Features include:

  • Much smaller code files
  • Both entity- and solution-based filtering available
  • Option sets are generated as enums
  • Attributes of type OptionSetValue (and others) have been abstracted away, and strongly-typed, to allow for cleaner and more robust code.
  • Additional helper methods for both entities and the service context have been added.
  • Simple deprecation of attributes/fields
  • DebuggerDisplay attributes on entities

Click here for more details on each of these points.

Getting Started

First see how to generate the context, and afterwards check out what you can use the generated code for.