DigitaleDelta.Contracts 1.0.1

dotnet add package DigitaleDelta.Contracts --version 1.0.1
                    
NuGet\Install-Package DigitaleDelta.Contracts -Version 1.0.1
                    
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="DigitaleDelta.Contracts" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DigitaleDelta.Contracts" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DigitaleDelta.Contracts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DigitaleDelta.Contracts --version 1.0.1
                    
#r "nuget: DigitaleDelta.Contracts, 1.0.1"
                    
#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.
#:package DigitaleDelta.Contracts@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DigitaleDelta.Contracts&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DigitaleDelta.Contracts&version=1.0.1
                    
Install as a Cake Tool

CSDL Parser

A lightweight Common Schema Definition Language (CSDL) parser for OData metadata documents. This parser reads EDMX/CSDL XML files and creates a structured model of the OData service metadata.

The model will contain structured data representing the parsed EDMX/CSDL document, including entity sets, entity types, complex types, and functions.

It can be used for translating OData queries into SQL or other data access layers and is used in the DigitaleDelta.ODataTranslator library.

Features

  • Parses EDMX/CSDL XML documents
  • Supports core OData metadata elements:
    • EntityContainer and EntitySets
    • EntityTypes with Keys
    • ComplexTypes
    • Functions with Parameters
    • EDM primitive types
  • Strong typing for EDM types
  • Null-safe parsing with detailed error messages
  • No external dependencies beyond .NET standard libraries

Usage

var parser = new CsdlParser();
var valid = parser.TryParse(edmxXmlContent, out var model, out error);

Porting

Porting this library to other programming languages should be fairly easy, as the library interprets XML and maps it to data classes.

Testing

This project uses XUnit for unit and integration tests. The test suite covers core functionality including OData parsing, SQL translation, and validation logic.

Running Tests

dotnet test
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DigitaleDelta.Contracts:

Package Downloads
DigitaleDelta.ODataTranslator

A .NET library designed to work with OData services within the Digitale Delta ecosystem. It provides a translator from OData queries to database queries.

DigitaleDelta.CsdlParser

A .NET library designed to work with OData services within the Digitale Delta ecosystem. It provides a CSDL Parser.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 139 9/9/2025
1.0.0 145 9/8/2025

Initial release of the Digitale Delta OData contracts library.