Schemata.Application.Complex.Targets 1.0.0-preview.24370.42

This is a prerelease version of Schemata.Application.Complex.Targets.
dotnet add package Schemata.Application.Complex.Targets --version 1.0.0-preview.24370.42                
NuGet\Install-Package Schemata.Application.Complex.Targets -Version 1.0.0-preview.24370.42                
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="Schemata.Application.Complex.Targets" Version="1.0.0-preview.24370.42" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Schemata.Application.Complex.Targets --version 1.0.0-preview.24370.42                
#r "nuget: Schemata.Application.Complex.Targets, 1.0.0-preview.24370.42"                
#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 Schemata.Application.Complex.Targets as a Cake Addin
#addin nuget:?package=Schemata.Application.Complex.Targets&version=1.0.0-preview.24370.42&prerelease

// Install Schemata.Application.Complex.Targets as a Cake Tool
#tool nuget:?package=Schemata.Application.Complex.Targets&version=1.0.0-preview.24370.42&prerelease                

Schemata

Application Framework aims on modular business applications.

GitHub Workflow Status Codecov license

netstandard2.0 netstandard2.1 net6.0 net8.0

Quick Start

dotnet new web
dotnet add package --prerelease Schemata.Application.Complex.Targets
var builder = WebApplication.CreateBuilder(args)
                            .UseSchemata(schema => {
                                 schema.UseLogging();
                                 schema.UseDeveloperExceptionPage();

                                 schema.ConfigureServices(services => {
                                     services.AddTransient(typeof(IRepositoryAddAsyncAdvice<>), typeof(MyAdviceAddAsync<>));

                                     services.AddRepository(typeof(MyRepository<>))
                                             .UseEntityFrameworkCore<MyDbContext>((sp, options) => options.UseSqlServer(schema.Configuration.GetConnectionString("Default")));

                                     services.AddDistributedMemoryCache();
                                 });

                                 schema.UseForwardedHeaders();
                                 schema.UseHttps();
                                 schema.UseCookiePolicy();

                                 schema.UseSession();

                                 schema.UseCors();
                                 schema.UseRouting();
                                 schema.UseControllers();
                                 schema.UseJsonSerializer();

                                 schema.UseTenancy()
                                       .UseHostResolver();
                                 schema.UseModular();

                                 schema.UseIdentity();
                                 schema.UseAuthorization(options => {
                                            options.AddEphemeralEncryptionKey()
                                                   .AddEphemeralSigningKey();
                                        })
                                       .UseCodeFlow()
                                       .UseRefreshTokenFlow()
                                       .UseDeviceFlow()
                                       .UseIntrospection()
                                       .UseCaching();
                                 schema.UseWorkflow();

                                 // You can also utilize UseAutoMapper() once you've incorporated the Schemata.Mapping.AutoMapper package into your project.
                                 schema.UseMapster()
                                       .Map<Source, Destination>(map => {
                                            map.For(d => d.DisplayName).From(s => s.Name);
                                            map.For(d => d.Age).From(s => s.Age).Ignore((s, d) => s.Age < 18);
                                            map.For(d => d.Grade).Ignore()
                                               .For(d => d.Sex).From(s => s.Sex.ToString());
                                        });

                                 schema.UseResource()
                                       .MapHttp()
                             });

var app = builder.Build();

app.Run();

Fields

Features

Features are modular components that can be integrated during the application startup process.

Each feature must implement the ISimpleFeature interface.

Features are characterized by Order and Priority, both of which are Int32 values. The Order determines the sequence in which the ConfigureServices methods are invoked. The Priority establishes the sequence for invoking the Configure<Application|Endpoints> methods.

The range [100_000_000, 1_000_000_000) and (2_147_000_000, 2_147_400_000] for Order and Priority is reserved for built-in features and Schemata extensions.

Built-in Features

A built-in feature can be activated by calling the UseXXX method on the SchemataBuilder instance. These features may also have additional configuration methods.

Priority Feature Description
100_010_000 ExceptionHandler Asp.Net Exception Handler Middleware
100_110_000 Logging Asp.Net Logging Middleware
100_120_000 HttpLogging Asp.Net HTTP Logging Middleware
100_130_000 W3CLogging Asp.Net W3C Logging Middleware
110_000_000 DeveloperExceptionPage Asp.Net Developer Exception Page Middleware
111_000_000 ForwardedHeaders Asp.Net Forwarded Headers Middleware
120_000_000 Https Asp.Net HTTPS & HTTPS Redirection Middlewares
130_000_000 CookiePolicy Asp.Net Cookie Policy Middleware
140_000_000 Routing Asp.Net Routing Middleware
141_100_000 Quota Asp.Net Rate Limiter Middleware
150_000_000 Cors Asp.Net CORS Middleware
160_000_000 Authentication Asp.Net Authentication & Authorization Middlewares
170_000_000 Session Asp.Net Session Middleware
210_000_000 Controllers Asp.Net MVC Middlewares, without Views
210_100_000 JsonSerializer Configure System.Text.Json to use snake_case and handle JavaScript's 53-bits integers

Extension Features

An extension feature can be activated in the same way as a built-in feature.

Priority Package Feature Description
310_000_000 Schemata.Identity.Foundation Identity Schemata Identity Foundation
320_000_000 Schemata.Authorization.Foundation Authorization Schemata Authorization Foundation
340_000_000 Schemata.Mapping.Foundation Mapping Schemata Mapper Foundation
350_000_000 Schemata.Workflow.Foundation Workflow Schemata Workflow Foundation
360_000_000 Schemata.Resource.Foundation Resource Schemata Resource Service
360_100_000 Schemata.Resource.Http Resource (MapHttp) Schemata Resource Service for HTTP
2_147_100_000 Schemata.Tenancy.Foundation Tenancy Schemata Tenancy Foundation
2_147_400_000 Schemata.Modular Modular Modularization

Compliance

Schemata is designed to comply with .NET Standard 2.0, .NET Standard 2.1, and the two most recent .NET Long-Term Support (LTS) versions, which are .NET 6.0 and .NET 8.0 at the time of writing.

Some packages may have additional compliance requirements, which are documented below.

Package Compliance
Schemata.DSL netstandard2.0
Schemata.Core net6.0 net8.0
Schemata.Modular net6.0 net8.0
Schemata.Authorization.Foundation net6.0 net8.0
Schemata.Identity.Foundation net6.0 net8.0
Schemata.Mapping.Foundation net6.0 net8.0
Schemata.Resource.Foundation net6.0 net8.0
Schemata.Tenancy.Foundation net6.0 net8.0
Schemata.Workflow.Foundation net6.0 net8.0

Schemata.Authorization.Foundation

Schemata Authorization Foundation is designed to comply with the OpenID Connect Core 1.0 specification.

Schemata.Identity.Foundation

Schemata Identity Foundation is designed to comply with Asp.Net Core Identity.

Additionally, we bring the Bearer Token Authentication Scheme and Core Identity API to platforms that do not support it.

Schemata.Mapping.Foundation

The Schemata Mapping Foundation is designed to be compatible with various mapping libraries, including AutoMapper and Mapster, among others.

It provides a unified interface for these libraries, enabling developers to switch between them without modifying their code.

Schemata.Resource.Foundation

The Schemata Resource Foundation is designed to comply with the API Improvement Proposals - General AIPs proposals.

Schemata.Workflow.Foundation

Unfortunately, the Schemata Workflow Foundation is not yet compliant with enterprise standards such as BPMN 2.0.

There are no supported framework assets in this 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.0.0-preview.24370.42 70 7/20/2024
1.0.0-preview.24305.58 61 6/5/2024
1.0.0-preview.24259.22 70 5/9/2024
1.0.0-preview.24230.15 57 4/30/2024
1.0.0-preview.24227.10 71 4/27/2024
1.0.0-preview.24226.92 60 4/26/2024
1.0.0-preview.24226.39 64 4/26/2024
1.0.0-preview.24225.65 59 4/25/2024
1.0.0-preview.24225.61 50 4/25/2024
1.0.0-preview.24225.33 55 4/25/2024
1.0.0-preview.24224.26 62 4/24/2024
1.0.0-preview.24223.62 65 4/23/2024
1.0.0-preview.24223.23 65 4/23/2024
1.0.0-preview.24222.70 68 4/22/2024
1.0.0-preview.24222.23 59 4/22/2024
1.0.0-preview.24222.21 56 4/22/2024
1.0.0-preview.24222.20 56 4/22/2024
1.0.0-preview.24221.62 66 4/21/2024
1.0.0-preview.24221.60 59 4/21/2024
1.0.0-preview.24219.37 59 4/19/2024
1.0.0-preview.24219.35 53 4/19/2024
1.0.0-preview.24218.65 47 4/18/2024
1.0.0-preview.24217.50 73 4/17/2024
1.0.0-preview.24217.16 58 4/17/2024
1.0.0-preview.24217.15 60 4/17/2024
1.0.0-preview.24217.9 60 4/17/2024
1.0.0-preview.24216.60 67 4/16/2024
1.0.0-preview.24216.55 57 4/16/2024
1.0.0-preview.24215.70 54 4/15/2024
1.0.0-preview.24213.26 58 4/13/2024
1.0.0-preview.24213.25 57 4/13/2024
1.0.0-preview.24213.21 56 4/13/2024
1.0.0-preview.24213.20 59 4/13/2024
1.0.0-preview.24213.11 62 4/13/2024
1.0.0-preview.24213.8 56 4/13/2024
1.0.0-preview.24213.5 53 4/13/2024
1.0.0-preview.24212.62 53 4/12/2024
1.0.0-preview.24212.52 57 4/12/2024
1.0.0-preview.24212.51 52 4/12/2024
1.0.0-preview.24212.43 56 4/12/2024
1.0.0-preview.24212.37 58 4/12/2024
1.0.0-preview.24212.36 50 4/12/2024
1.0.0-preview.24212.29 54 4/12/2024
1.0.0-preview.24212.24 54 4/12/2024
1.0.0-preview.24212.17 54 4/12/2024
1.0.0-preview.24211.59 50 4/11/2024
1.0.0-preview.24211.57 54 4/11/2024
1.0.0-preview.24211.54 56 4/11/2024
1.0.0-preview.24211.51 53 4/11/2024
1.0.0-preview.24211.50 54 4/11/2024
1.0.0-preview.24211.49 53 4/11/2024
1.0.0-preview.24211.47 48 4/11/2024
1.0.0-preview.24211.24 64 4/11/2024
1.0.0-preview.24211.23 60 4/11/2024
1.0.0-preview.24211.21 52 4/11/2024
1.0.0-preview.24211.18 59 4/11/2024
1.0.0-preview.24210.56 55 4/10/2024
1.0.0-preview.24210.52 51 4/10/2024
1.0.0-preview.24210.51 43 4/10/2024
1.0.0-preview.24210.49 53 4/10/2024
1.0.0-preview.24210.43 59 4/10/2024
1.0.0-preview.24210.42 54 4/10/2024
1.0.0-preview.24210.34 53 4/10/2024
1.0.0-preview.24210.31 44 4/10/2024
1.0.0-preview.24210.30 48 4/10/2024
1.0.0-preview.24209.57 55 4/9/2024
1.0.0-preview.24209.56 66 4/9/2024
1.0.0-preview.24209.35 52 4/9/2024
1.0.0-preview.24209.19 62 4/9/2024
1.0.0-preview.24209.9 67 4/9/2024
1.0.0-preview.24208.59 63 4/8/2024
1.0.0-preview.24207.28 69 4/7/2024
1.0.0-preview.24207.14 61 4/7/2024
1.0.0-preview.24207.11 64 4/7/2024
1.0.0-preview.24207.8 60 4/7/2024
1.0.0-preview.24206.54 61 4/6/2024
1.0.0-preview.24204.4 64 4/4/2024
1.0.0-preview.24204.3 54 4/4/2024
1.0.0-preview.24204.2 59 4/4/2024
1.0.0-preview.24203.51 52 4/3/2024
1.0.0-preview.24202.68 62 4/2/2024
1.0.0-preview.24181.28 65 3/31/2024
1.0.0-preview.24181.19 49 3/31/2024
1.0.0-preview.24181.18 73 3/31/2024
1.0.0-preview.24181.10 60 3/31/2024
1.0.0-preview.24180.84 56 3/30/2024
1.0.0-preview.24180.78 56 3/30/2024
1.0.0-preview.24180.70 58 3/30/2024
1.0.0-preview.24180.68 53 3/30/2024
1.0.0-preview.24180.66 56 3/30/2024
1.0.0-preview.24180.39 58 3/30/2024
1.0.0-preview.24179.42 55 3/29/2024
1.0.0-preview.24179.41 56 3/29/2024
1.0.0-preview.24179.39 55 3/29/2024
1.0.0-preview.24179.36 62 3/29/2024
1.0.0-preview.24179.18 64 3/29/2024
1.0.0-preview.24178.52 63 3/28/2024
1.0.0-preview.24177.13 64 3/27/2024
1.0.0-preview.24176.57 40 3/26/2024
1.0.0-preview.24176.43 41 3/26/2024
1.0.0-preview.24176.38 61 3/26/2024
1.0.0-preview.24175.48 60 3/25/2024
1.0.0-preview.24175.44 52 3/25/2024
1.0.0-preview.24175.38 65 3/25/2024
1.0.0-preview.24175.32 60 3/25/2024
1.0.0-preview.24175.24 59 3/25/2024
1.0.0-preview.24174.7 66 3/24/2024
1.0.0-preview.24173.57 62 3/23/2024
1.0.0-preview.24173.48 61 3/23/2024
1.0.0-preview.24173.37 64 3/23/2024
1.0.0-preview.24173.34 73 3/23/2024
1.0.0-preview.24172.52 56 3/22/2024
1.0.0-preview.24172.51 62 3/22/2024
1.0.0-preview.24172.50 59 3/22/2024
1.0.0-preview.24172.48 67 3/22/2024
1.0.0-preview.24172.33 67 3/22/2024
1.0.0-preview.24169.56 77 3/19/2024
1.0.0-preview.24169.44 56 3/19/2024