TRENZ.EL.ElApi 1.0.0-beta1

This is a prerelease version of TRENZ.EL.ElApi.
There is a newer version of this package available.
See the version list below for details.
dotnet add package TRENZ.EL.ElApi --version 1.0.0-beta1                
NuGet\Install-Package TRENZ.EL.ElApi -Version 1.0.0-beta1                
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="TRENZ.EL.ElApi" Version="1.0.0-beta1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TRENZ.EL.ElApi --version 1.0.0-beta1                
#r "nuget: TRENZ.EL.ElApi, 1.0.0-beta1"                
#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 TRENZ.EL.ElApi as a Cake Addin
#addin nuget:?package=TRENZ.EL.ElApi&version=1.0.0-beta1&prerelease

// Install TRENZ.EL.ElApi as a Cake Tool
#tool nuget:?package=TRENZ.EL.ElApi&version=1.0.0-beta1&prerelease                

El.ElApi

This is a pre-release of an easyLogic 3.15 feature. An easyLogic development license is required.

See https://docs.ela.easylogic.de for usage details.

Basic usage

In an ASP.NET Core project,

  • add this as a NuGet package references.
  • your Configure method (or top-level method) needs to end something like:
// add this _before_ routing
app.UseElApiDiscovery();

app.UseRouting();

app.UseEndpoints(endpoints =>
{
    endpoints.MapControllers();

    endpoints.MapHub<ProgressHub>("/hubs/progress"); // add this inside `UseEndpoints`
});

A controller should follow an ELA-compatible naming convention. (If it does
not, you may need to fully specify the URL.) For example, the class can be
declared like:

```csharp
[Area("_Default")]
[Route("ELAPI/[area]/[controller]/[action]")]
public class dMyInvoiceController : ControllerBase
{
    private readonly IHubContext<ProgressHub> _HubContext;

    public dMyInvoiceController(IHubContext<ProgressHub> hubContext)
    {
        _HubContext = hubContext;
    }
}

If used on a container of the type MyInvoice, easyLogic will automatically expand the correct route.

Finally, a method body should look like:

[HttpPost]
public async Task<IActionResult> MyButtonAction([FromBody] ContainerWithProgressRequest request)
{
    var progress = ELSimpleProgress.Create(request.SessionID, _HubContext);

    using var eldata = await ELDatas.OpenAsync(/* some connection string */, request.UserID);

    return Ok();
}

Inside, you can use eldata to access the database, and progress to send progress information back to the client. UserID is also set, so you can use server messages as well.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • 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 411 10/13/2022
1.0.0-beta3 131 10/12/2022
1.0.0-beta2 131 10/5/2022
1.0.0-beta1 133 10/5/2022