Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions
1.0.0
dotnet add package Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions --version 1.0.0
NuGet\Install-Package Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions as a Cake Addin #addin nuget:?package=Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions&version=1.0.0 // Install Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions as a Cake Tool #tool nuget:?package=Heiigjen.Dataverse.Tools.CrmSvcUtilExtensions&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CrmSvcUtilExtensions
This is an extension to CrmSvcUtil.
CrmSvcUtil generates early-bound .NET Framework classes that represent the Entity Data Model (EDM) used by Dataverse.
The generated file often gets very large and contain unnecesarry classes. This extension adds functionality to filter what's being generated.
How to use
This is packaged as a tool and includes CrmSvcUtil so you can simply run it as:
<pkg_location>\tools\CrmSvcUtil.exe /interactivelogin /url:<url> /out:GeneratedCode.cs /filterFile:<FILTER_FILENAME>
Sample
C:\> CrmSvcUtil /url:<API_URL> /out:<FILENAME> /language:CS /namespace:<NAMESPACE> /interactivelogin /emitfieldsclasses filterfile:<FILTER_FILENAME>
Sample placeholder values
Param | Value |
---|---|
API_URL | https:/YOURORG.api.crm.dynamics.com/XrmServices/2011/OrganizationData.svc |
NAMESPACE | Models.Dataverse |
FILENAME | dataverse_models.cs |
FILTER_FILENAME | filter.json |
filter.json
{
"Generate": {
"Entities": true,
"Attributes": true,
"OptionSets": true,
"Relationships": false
},
"Filters": {
/*
Possible filters:
{ "Type": "all" },
{ "Type": "exact", "Value": "account" },
{ "Type": "startsWith", "Value": "msdyn_" },
{ "Type": "endsWith", "Value": "id" },
{ "Type": "regex", "Value": "(msdyn|new)_.*id" },
For entities: attribute filters may be added per entity filter:
{ "Type": "exact", "Value": "contact", "Attributes": [
{ "Type": "endsWith", "Value": "Id" },
{ "Type": "startsWith", "Value": "msdyn_" },
]},
*/
"Entities": [
{ "Type": "exact", "Value": "account" },
{
"Type": "regex",
"Value": "(msdyn|new)_",
"Attributes": [
{ "Type": "endsWith", "Value": "Id" },
{ "Type": "startsWith", "Value": "msdyn_" },
]
},
],
"OptionSets": [
{ "Type": "all", "Value": null },
],
"Relationships": [
{ "Type": "all", "Value": null },
]
}
}
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 270 | 3/6/2022 |
v1.0.0: Initial release