AddCartService
This commit is contained in:
parent
2b00319e87
commit
f51c2623c8
@ -15,9 +15,9 @@ namespace TestAppRuna.API
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class CartController : ControllerBase
|
public class CartController : ControllerBase
|
||||||
{
|
{
|
||||||
public CartService CartSvc { get; }
|
public ICartService CartSvc { get; }
|
||||||
|
|
||||||
public CartController(CartService cartSvc)
|
public CartController(ICartService cartSvc)
|
||||||
{
|
{
|
||||||
this.CartSvc = cartSvc;
|
this.CartSvc = cartSvc;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ namespace TestAppRuna
|
|||||||
services.AddSingleton<WeatherForecastService>();
|
services.AddSingleton<WeatherForecastService>();
|
||||||
|
|
||||||
services.AddScoped<IMathService, MathService>();
|
services.AddScoped<IMathService, MathService>();
|
||||||
|
services.AddScoped<ICartService, CartService>();
|
||||||
services.Configure<AppSettings>(Configuration);
|
services.Configure<AppSettings>(Configuration);
|
||||||
services.AddScoped<AppSettings>(di => di.GetRequiredService<IOptionsMonitor<AppSettings>>().CurrentValue);
|
services.AddScoped<AppSettings>(di => di.GetRequiredService<IOptionsMonitor<AppSettings>>().CurrentValue);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user