transient, scoped, and singleton
// IProductCatalogService.cs
public interface IProductCatalogService {
List GetProducts();
}
// IShoppingCartService.cs
public interface IShoppingCartService {
void AddToCart(Product product);
List GetCartItems();
}
// IOrderProcessingService.cs
publ...
tandan.hashnode.dev1 min read