Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IOperations {
- }
- public interface ICatalog : IOperations {
- }
- public interface IAdmin : ICatalog {
- }
- public interface ICatalogService : IAdmin, ISomethingElse {
- }
- public void ConfigureServices(IServiceCollection services) {
- services.AddMvc();
- ICatalogService catalogService = new SomeConcreteService();
- services.AddSingleton(catalogService);
- }
- public class CatalogController:Controller
- {
- private IOperations operations;
- public CatalogController(IOperations ops)
- {
- this.operations=ops;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement