TRENZ.EL.ElApi
1.0.0
dotnet add package TRENZ.EL.ElApi --version 1.0.0
NuGet\Install-Package TRENZ.EL.ElApi -Version 1.0.0
<PackageReference Include="TRENZ.EL.ElApi" Version="1.0.0" />
paket add TRENZ.EL.ElApi --version 1.0.0
#r "nuget: TRENZ.EL.ElApi, 1.0.0"
// Install TRENZ.EL.ElApi as a Cake Addin #addin nuget:?package=TRENZ.EL.ElApi&version=1.0.0 // Install TRENZ.EL.ElApi as a Cake Tool #tool nuget:?package=TRENZ.EL.ElApi&version=1.0.0
El.ElApi
This package contains supportive developer tooling for an easyLogic 3.15 feature. An easyLogic development license is required.
See https://docs.ela.easylogic.de for usage details.
Changes
1.0
This release is intended to be used with easyLogic 3.15.2 and newer.
It supports:
- simple progress (small inline progress bar)
- descriptive progress (a larger progress bar with an optional title and description of the current step)
- ASP.NET Core 3.1, 6.0, and 7.0
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:
[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 | Versions 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. |
-
.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 | 415 | 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 |