1
Reply

What ConfigureServices() method does in Startup.cs?

Rajesh Gami

Rajesh Gami

6y
2.1k
2
Reply

    This method is optional. It is the place to add services required by the application. For example, if you wish to use Entity Framework in your application then you can add in this method.public void ConfigureServices(IServiceCollection services) {services.Configure(Configuration.GetSubKey("AppSettings"));services.AddEntityFramework().AddSqlServer().AddDbContext();// Add MVC services to the services container.services.AddMvc(); }