Я работаю с EF Core в подходе Code-First.Все работает так же, как EF 6.0 для миграции, создания таблиц, отношений и т. Д. Но в таблице __EFMigrationsHistory ничего не хватает, для хранения двоичных данных миграции должен быть столбец «Модель».Столбец модели не был создан при запуске команды update-database.Пожалуйста, проверьте мои ниже коды и изображение.
![enter image description here](https://i.stack.imgur.com/RAnw3.png)
DbContext
namespace ProfileCore.DataAccess
{
/// <summary>
/// Represents DB Context (DbSet, Configuration and common activities)
/// </summary>
public partial class ProfileCoreDbContext: DbContext, IDbContext
{
#region Ctor
public ProfileCoreDbContext(DbContextOptions<ProfileCoreDbContext> options) : base(options)
{
}
#endregion
#region Authentications DbSets
public virtual DbSet<UserType> UserType { get; set; }
#endregion
#region Utilities
/// <summary>
/// Further configuration the model
/// </summary>
/// <param name="modelBuilder">The builder being used to construct the model for this context</param>
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
}
#endregion
}
}
Обновление-Команда:
Update-Database -Migration 20190703213515_FirstMigration