Replaced DbContext registration to use SplitQuery mode
This commit is contained in:
@@ -20,7 +20,8 @@ var connectionString = builder.Configuration.GetConnectionString("FrancescosReci
|
||||
?? throw new InvalidOperationException("Connection string 'FrancescosRecipesWorldDbContextConnection' not found.");
|
||||
|
||||
services.AddDbContext<FrancescosRecipesWorldDbContext>(options =>
|
||||
options.UseSqlServer(connectionString));
|
||||
options.UseSqlServer(connectionString, sqlOptions =>
|
||||
sqlOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)));
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
|
||||
Reference in New Issue
Block a user