What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

.NET Core 2.0

DiSSaRRaY

Epic Member
Rating - 100%
35   0   0
Joined
Apr 23, 2010
Messages
1,279
Reaction score
42
Points
3,015
Location
K-Pax / Johannesburg
It's fast, it's easy... but man it can be a pain in the ass to get stuff working.

We're currently working on a .NET Core 2.0 Web Project, which is running perfectly fine.

What I didn't know, is that it doesn't support EntityFramework 6 and below. You'll find it might work sometimes, but the problem is that there is no *.config file with a connection string for EF to reference in the web project.
If you use EntityFramework Core, you might be in the clear, but it's a bit more of a job to setup you context, and it looks like quite a few things from SQL's side isn't yet supported.

So get around this problem, I've added a Console application to the solution, that runs as a post build event when the Web Project has built.
What this Console application does, is open the <App>.exe.config in the Debug/Release folder, write in the connection strings, and save the file.

At least for now, we can actually continue working without having to update the files manually.
 
Heh. Our 2-week planned upgrade took 8 weeks and the issues are still not all fixed.
 
I haven't had too much issues with 2.0 yet. I migrated to EF Core though for the small projects that I actually use EF on... Setup your new context and then import your old Models, not much to change on the POCO side of things. IMHO you're much better off with Dapper or something else for bigger projects.

When I tried 1.0 though I gave up as it wasn't mature yet, but from 2.0 it has been great.
 

Users who are viewing this thread

Back
Top Bottom