EF Core Migration Scripts is incompleted
Posted: Thu 10 May 2018 07:23
I have built an .Net Core 2.0 console app, with EF Core 2.0.3,dotConnect for Oracle 9.5.502.
When I issue an migration with `Add-Migration InitialCreate` in NuGet Console, It created three files.
- 20180510071055_InitialCreate.cs
- 20180510071055_InitialCreate.Designer.cs
- MyDbContextModelSnapshot.cs
In file 20180510071055_InitialCreate.Designer.cs and file MyDbContextModelSnapshot.cs, the first using is not complete.
This bug came from dotConnect for Oracle 9.5.454. Thanks.
Code: Select all
namespace OraclePoc
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
class Product
{
public int Id { get; set; }
}
class MyDbContext : DbContext
{
public DbSet<Product> Products { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseOracle(@"REDACTED");
}
}
}
- 20180510071055_InitialCreate.cs
- 20180510071055_InitialCreate.Designer.cs
- MyDbContextModelSnapshot.cs
In file 20180510071055_InitialCreate.Designer.cs and file MyDbContextModelSnapshot.cs, the first using is not complete.
Code: Select all
// <auto-generated />
using ;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using OraclePoc;
using System;