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

Entity Framework 6 configuration #633

Closed
damienpontifex opened this issue Nov 11, 2015 · 6 comments
Closed

Entity Framework 6 configuration #633

damienpontifex opened this issue Nov 11, 2015 · 6 comments
Milestone

Comments

@damienpontifex
Copy link
Contributor

I have started working on a new topic for configuring and utilising EF6 in ASP.NET 5 after dotnet/aspnetcore#1062 in collaboration with @pgrudzien12 after his article http://bleedingnedge.com/2015/11/01/entity-framework-6-with-asp-net-5/

It covers:

  • Connection strings and DI
  • Configuration in code of EF6
@Eilon
Copy link
Member

Eilon commented Nov 11, 2015

@rowanmiller

@rowanmiller
Copy link
Contributor

Hey,

I took a look at the article and it looks like good info. You should probably call out that migrations commands won't work because xproj does not support loading commands into Package Manager Console (this will change for RTM though).

Happy to do a final review etc. if you send a PR.

~Rowan

@danroth27
Copy link
Member

@damienpontifex Are you still planning on contributing this article? Sounds like @rowanmiller is happy to review the PR.

@danroth27 danroth27 added this to the 1.0.0-rc2 milestone Dec 8, 2015
shirhatti pushed a commit that referenced this issue Dec 10, 2015
added authors and code block for config

Article started based on aticle by @pgrudzien12 for #633

Added dependency injection and configuration in code for asp.net 5
to replace web/app.config configuration

fixed minor formatting problems and typos, changed author sequnece, added Summary and Resources sections

fixed hyperlinks

moving migration note into own section and renaming title

reviewed ef6 article

changes from PR feedback
@virshu
Copy link

virshu commented Jan 2, 2016

So, what are the options regarding migrations? I am getting "tables has changed" error, pointing to tutorial on migrations, and that doesn't work...

Frankly, some authoritative guidance on combining ASP.NET 5, MVC 6, and EF6 would be really helpful. There are snippets here and there - but I have a team of quite experienced .NET/MVC/EF developers that are pulling their hair out (sigh)

@pgrudzien12
Copy link

@virshu I have project in advanced phase with EF6 and asp.net 5 and i'm so far happy with solutions i've given on my blog. If you have any specific problems i'm happy to help you. Tweet me if any of the solutions provided does not work for you.

@virshu
Copy link

virshu commented Jan 3, 2016

Thank you, @pgrudzien12 ! Your blog post (and similar on docs.asp.net) was the most helpful for us to get ASP.NET 5 + EF 6 working together. Still, it felt that solution was very brittle; inability to run migration was just the latest problem. I guess it was the last straw that made us rethink the decision not to go with EF7. We have the database from the legacy system; but otherwise the application is quite greenfield. We had significant problems importing EF7 POCO classes. We still have a few problems - but it's pretty clear how to handle them.

So, the bottom line, we made New Year decision to switch to EF7... We'll see how it goes :)

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

6 participants