Answers for "c# services.adddbcontext"

C#
0

c# services.adddbcontext

public void ConfigureServices(IServiceCollection services)
             {
                 var connectionString = "connection string to database";
  
                 services.AddDbContext<MyContext>(ServiceLifetime.Scoped);
             }
Posted by: Guest on September-18-2020

C# Answers by Framework

Browse Popular Code Answers by Language