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

EF Core 2.2 DbContext Properties<string> "missing" #14201

Closed
douglassimaodev opened this issue Dec 18, 2018 · 1 comment
Closed

EF Core 2.2 DbContext Properties<string> "missing" #14201

douglassimaodev opened this issue Dec 18, 2018 · 1 comment

Comments

@douglassimaodev
Copy link

I could not find a topic like that in here, if there is, sorry for that.

Here we go, On prev version like EF 6.0 we had the possibility to set a default column type
like: //General Custom Context Properties
builder.Properties()
.Configure(p => p.HasColumnType("nvarchar"));

and this would be applied for all fields of type string, where I can't find a similar way for Ef core

same for those options here:

modelBuilder.Conventions.Remove();
modelBuilder.Conventions.Remove();
modelBuilder.Conventions.Remove();
modelBuilder.Conventions.Remove();

for now on what is the recommendation to try to get the same behavior in EF core 2/3.0?

@ajcvickers
Copy link
Member

@douglassimaodev Basically, you can iterate over the model at the end of OnModelCreating and bulk set facets like this. There are some examples in #6787.

@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
Projects
None yet
Development

No branches or pull requests

2 participants