- Добавить-Передать
- Удалить базы данных
- Получение DbContext
- Scaffold-DbContext
- Скрипт миграции
- Обновление база данных
"Оба объекта Установлены Framework Core и Entity Framework 6. Инструменты Entity Framework Core запущены. Используйте «EntityFramework\Add-Migration» для Entity Framework 6. В сборке «main_frame» не найден DbContext. Убедитесь, что вы используете правильную сборку и. что тип не является ни абстрактным, ни универсальным."
Как бы я ни вызывал различные команды, в DbContext возникает ошибка.
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace main_frame
{
internal class ApplicationContext : DbContext
{
public DbSet All_Info { get; set; }
public ApplicationContext() : base("DefaultConnection") { }
}
}
Я устанавливал различные библиотеки и менял конфигуратор. Ничего не помогло.
PM> add-migration first
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFramework6\Add-Migration' for Entity Framework 6.
Build started...
Build succeeded.
No DbContext was found in assembly 'main_frame'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.
PM>
Подробнее здесь: https://stackoverflow.com/questions/786 ... main-frame
Мобильная версия