Interviews - C# Corner

Rajesh Gami
What ConfigureServices() method does in Startup.cs?
By Rajesh Gami in ASP.NET Core onApr 14 2018
  • Rajesh Gami
    Apr, 2018 14

    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; }

    • 0

Most Popular Companies

Most Popular Job Functions