Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty using statements generated by adding migrations when DbContext not in namespace #5469

Closed
divega opened this issue May 23, 2016 · 2 comments

Comments

@divega
Copy link
Contributor

divega commented May 23, 2016

If the DbContext class is not in a namespace adding a migration will generate an empty using statement (which is not valid in C#) in both the snapshot and the designer class:

using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using;
...

This is not a very important scenario because creating classes without a namespace isn't common these days (it used to be more common with ASP.NET Web Sites) but on the other hand I think it should be an easy fix.

(I think I have seen this mentioned by a customer before but I couldn't find an existing issue)

@rowanmiller
Copy link
Contributor

#2467 is probably the one you are thinking of.

@rowanmiller
Copy link
Contributor

Closing as a dupe

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants