Example #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(Microsoft.AspNetCore.Mvc.CompatibilityVersion.Version_3_0);

            DependencyInjectionHelper.ConfigurationServiceProvider();
            //services.AddDbContext<AppDbContext>(options => {
            //    options.UseInMemoryDatabase("RestAPI-in-memory");
            //});

            //services.AddScoped<ICategoryRepository, CategoryRepository>();
            //services.AddScoped<ICategoryService, CategoryService>();
        }