Вход на сайт
Миграция .Net Framework => .Net Core
1848 просмотров
Перейти к просмотру всей ветки
Срыв покровов патриот
в ответ AlexNek 07.08.23 18:10
services.AddDbContext<AppDbContext>( optionsBuilder => { { optionsBuilder.UseOraclel($"password={appSettings.DbPassword};{appSettings.ConnectionString}"); optionsBuilder.EnableSensitiveDataLogging().LogTo(l => Debug.WriteLine(l)); optionsBuilder.EnableDetailedErrors(true); optionsBuilder.LogTo(l => Debug.WriteLine(l)); } }, ServiceLifetime.Transient);
Функция AddDbContext это часть EntityFrameworkCore
а мне нужно оставить EntityFramework 6, чтобы работал ServiceHost и все остальное