JFA.DependencyInjection 7.0.1

dotnet add package JFA.DependencyInjection --version 7.0.1                
NuGet\Install-Package JFA.DependencyInjection -Version 7.0.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="JFA.DependencyInjection" Version="7.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JFA.DependencyInjection --version 7.0.1                
#r "nuget: JFA.DependencyInjection, 7.0.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.
// Install JFA.DependencyInjection as a Cake Addin
#addin nuget:?package=JFA.DependencyInjection&version=7.0.1

// Install JFA.DependencyInjection as a Cake Tool
#tool nuget:?package=JFA.DependencyInjection&version=7.0.1                

JFA.DependencyInjection

Register services according to container with service lifetime attributes

Install package from nuget.org

NuGet\Install-Package JFA.DependencyInjection -Version <VERSION>

Add lifetime attribute to service implementations

[Scoped]
public class UsersService : IUsersService
{...}

[Transient]
public class ProductsService : IProductsService
{...}

[Singleton]
public class OrdersService : IOrdersService
{...}

Add following line to Program.cs file

builder.Services.AddServicesFromAttribute();

Now you can inject services

public UsersController(IUsersService usersService)
{...}
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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on JFA.DependencyInjection:

Package Downloads
JFA.Telegram

Telegram with commands

MJ.Telegram

Designed with simplicity and efficiency in mind, StepCommandHandler streamlines the process of implementing step-based workflows, providing a seamless experience for both developers and end-users. With its intuitive API and comprehensive features, developers can easily define, execute, and monitor multi-step processes, ensuring a smooth and engaging user experience. Key Features: Step Management: Define and organize multi-step processes with ease, allowing for structured user interactions. Command Handling: Effortlessly handle user commands within each step, enabling precise control over application flow. Step Tracking: Seamlessly track user progress through each step, facilitating contextual interactions and personalized experiences. Extensibility: Customize and extend functionality to suit specific application requirements, ensuring flexibility and scalability.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.1 158 9/28/2023
7.0.0 100 9/28/2023
1.0.7 681 11/1/2022
1.0.6 321 10/28/2022
1.0.5 366 10/21/2022
1.0.1 489 10/17/2022
1.0.0 384 10/16/2022