The CrmMetal utility is used to generate a CRM Data Context class as well as data transfer object (DTO) classes for all CRM entities.  This mechanism follows the same design pattern as SqlMetal implements in the Entity Framework.  The data context class is responsible for all data operations as well as to give IQueryable interfaces for all entities in CRM.  Data retrieval is done through performing LINQ queries against the IQueryable entity set properties. Data changes are handled by the AddObject, DeleteObject, UpdateObject and SaveChanges methods.

The ADXSTUDIO xRM SDK contains a pre-generated data context for the out-of-the-box CRM entities plus our basic customizations.  This data context class and the DTO classes can be used by your application to access the CRM entities and properties that have not been customized.  If you have customized your entities, you should generate your own data context and DTO classes with the CrmMetal utility.

Required References

The classes that are output by CrmMetal are designed to go into a class library that can then be referenced by your projects that are using CRM.

The class library that these classes are brought into requires the following .Net References:

From the ADXSTUDIO Framework folder:
microsoft.crm.sdk.dll
microsoft.crm.sdktypeproxy.dll
Adxstudio.Core.dll
Adxstudio.Microsoft.Crm.dll
Adxstudio.Xrm.dll

From the .NET tab:
System.Data.Entity (not required in version 2.2)
System.Data.Services
System.Data.Services.Client