-
Notifications
You must be signed in to change notification settings - Fork 2
C# Interfaces
Trevor Fayas edited this page Aug 4, 2021
·
2 revisions
As with any good design, all of the operations in the GenericEcommerce system are done through dependency injection, with Interfaces you yourself can implement and overwrite.
Since all source code is available as well, you can very easily copy one of the implementations and adjust as needed. To use your own implementation, after you initialize the services (defaults), just implement your own:
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
...
services.RegisterEcommerceServices(new EcommerceServiceConfiguration() { CheckoutUrl = "/Products/Checkout", ThankYouUrl = "/Products/Thank-You", UseCustomProductFields = true });
// Implement your own
services.AddScoped<ICartRepository, MyCustomCartRepository>();
...
}
}
Available to you are:
- Installation / Setup
- Design Principle
- Basic Usage
- Operations and Interfaces
- Customization Points
- Creating Custom Payment Gateways