Skip to content

Scaffolding Migrations programmatically in Asp.Net Core 5 and EF Core 5 #23595

@oNoobMastero

Description

@oNoobMastero

I'm trying to scaffold migration files by Internal EF Core APIs programmatically. But I get:

System.NullReferenceException: 'Object reference not set to an instance of an object.'

from ScaffoldMigration method and nothing is NULL as u can see below.

image

and what's alternative for this
new Microsoft.EntityFrameworkCore.SqlServer.Design.Internal.SqlServerDesignTimeServices().ConfigureDesignTimeServices(designTimeServiceCollection);

because in below screenshot shows a green underline and says

It may be changed or removed without notice in any release

image

thanx for helping :)

EF Core version: 5.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: ASP.NET Core 5.0
Operating system: Windows 10
IDE: Visual Studio 2019 Preview latest

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions