Reverse engineering: Scaffold-DbContext creates invalid code for default constraints with line breaks #8077
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Describe what is not working as expected.
When running Scaffold-DbContext
The Generation of Fluent API for the default value in Context.OnModelCreating(ModelBuilder modelBuilder), returns SQL Server comments which affects the compilation of the Project in VS.
If you are seeing an exception, include the full exceptions details (message and stack trace).
Steps to reproduce
make a new database in sql server, and run the file "sqlSampleTableToProveGenerationProblem.sql" and don't delete the first empty lines:
https://goo.gl/w1Fb5v
then generate the POCO Entities + the Context, and you will see these problematic lines:
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
Further technical details
EF Core version: 1.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Win 10
IDE: Visual Studio 2017
The text was updated successfully, but these errors were encountered: