DigitaleDelta.Contracts
1.0.1
dotnet add package DigitaleDelta.Contracts --version 1.0.1
NuGet\Install-Package DigitaleDelta.Contracts -Version 1.0.1
<PackageReference Include="DigitaleDelta.Contracts" Version="1.0.1" />
<PackageVersion Include="DigitaleDelta.Contracts" Version="1.0.1" />
<PackageReference Include="DigitaleDelta.Contracts" />
paket add DigitaleDelta.Contracts --version 1.0.1
#r "nuget: DigitaleDelta.Contracts, 1.0.1"
#:package DigitaleDelta.Contracts@1.0.1
#addin nuget:?package=DigitaleDelta.Contracts&version=1.0.1
#tool nuget:?package=DigitaleDelta.Contracts&version=1.0.1
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 | Versions 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. |
-
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.
Initial release of the Digitale Delta OData contracts library.