IMPLEX.DDALEF.Interface 1.2.1

dotnet add package IMPLEX.DDALEF.Interface --version 1.2.1
                    
NuGet\Install-Package IMPLEX.DDALEF.Interface -Version 1.2.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="IMPLEX.DDALEF.Interface" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IMPLEX.DDALEF.Interface" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="IMPLEX.DDALEF.Interface" />
                    
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 IMPLEX.DDALEF.Interface --version 1.2.1
                    
#r "nuget: IMPLEX.DDALEF.Interface, 1.2.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 IMPLEX.DDALEF.Interface@1.2.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=IMPLEX.DDALEF.Interface&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=IMPLEX.DDALEF.Interface&version=1.2.1
                    
Install as a Cake Tool

This NuGet package is the front-facing module of DDAL/EF. It contains its executors and orchestrators.

DDAL/EF is a data analysis tool used to query, fetch, aggregate and format data using your .NET data model as a referential. With the power of Entity Framework Core, you can use it across multiple relational providers. DDAL/EF uses the syntax from its twin brother, DDAL (Dynamic Data Analysis Language) to perform its analyses in a simple and efficient manner.

You can find more info on our website at https://ddal.io. We have a demonstration tool using a sample model on it. The full documentation is available on our website. This page relates to NuGet deployment. A Docker image is available on Docker Hub under the tag impl3x/ddal-ef.

**Please check out this product's license here 😗* https://www.implex.fr/telechargements/Contrat_de_licence_Dynamic_Data_Analysis_Language_EF-EN.pdf

Quick example

The below request is a single part cross analysis on stores. It returns the average age of store owners owning stores selling unexpired potatoes.

test = cross analysis
{
    main = part
    {
        root = Store,
        filter %= "Products:any["Product.ExpirationDate > TODAY"].Name = 'Potatoes'",
        aggregation /= avg(Owner.Age)
    }
}

You can do multi-part analyses, use inner filtres, implicit joins, group by expressions, complex aggregations, etc. Listings with custom projections can also be used. You can combine cartesian/non-cartesian projections with coalesced lists, etc. An example:

test = listing analysis
{
    root = Store,
    cartesian = yes,
    
    targets = dic
    {
        store_names /= Name,
        product_name /= Products.Product.Name,
        product_expiry /= Products.Product.ExpirationDate
    },
    
    coalesce = dic
    {
        products /= Products
    }
}

How to use

See the DDAL website for full documentation.

You will first need to register your license key:

using IMPLEX.DDALEF.Interface;

License.Set(yourLicenseKey);

Once that is done you will need a proper way to execute and process your requests through DDAL/EF. The only need supported way to work with NuGet packages is to use a DI container to resolve internal services. To register the needed services, copy the below:

myServices.AddDDAL(builder =>
{
    builder
        .AddLinqReferentials()
        .AddRootTypes(myRootTypes)
        .AddFiltering()
        .AddAnalysis()
        .AddEFCore<yourContextType>() // or AddEFCore(yourContextType)
        .AddFilterExecutor()
        .AddAnalysisExecutor();
}

Let's break down those services line by line:

  • Linq referentials are a required internal service.
  • Root types defines, indeed, the root types that are considered valid as root contexts for your cross analysis and listing analysis requests. Any other context/entity than those registered here will throw an error.
  • AddFiltering registers filtering processors; you can customize some options there if you wish, and have them registered as a singleton or with a scoped lifetime if you like.
  • AddAnalysis does the same thing for analysis processors and options.
  • AddEFCore registers EFCore processors (those who translate LINQ into EF Core request delegates) for a given context type. It is expected that your root types should be accessible directly from your context.
  • AddFilterExecutor registers the FilteringExecutor class which acts as the entrypoint for the processing and direct execution of your filter requests. It is "optional" if you only wish to execute standalone analysis expressions.
  • AddAnalysisExecutor does the same thing for AnalysisExecutor and analysis expressions. It is "optional" if you only wish to execute standalone filter expressions.

If you use ASP .NET Core this would most likely look like:

builder.Services.AddDDAL(builder =>
{
    builder
        .AddLinqReferentials()
        .AddRootTypes(myRootTypes)
        .AddFiltering()
        .AddAnalysis()
        .AddEFCore<yourContextType>() // or AddEFCore(yourContextType)
        .AddFilterExecutor()
        .AddAnalysisExecutor();
}

Once that is done, create your controllers or your application logic and use DI to resolve either a FilterExecutor or an AnalysisExecutor depending on what you need. You can then process requests like so:

var result = await executor.Process(request);
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.

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.2.1 330 10/27/2023
1.2.0 166 10/24/2023