Thanks Thanks:  0
Results 1 to 4 of 4

Thread: .NET Core 2.0

  1. #1
    Join Date
    Apr 2010
    Location
    K-Pax / Woodmead
    Posts
    564
    Mentioned
    25 Post(s)

    .NET Core 2.0

    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.
    "What do you have under the bonnet?"
    "A misfire... let's race."

  2. #2
    Toxxyc's Avatar
    Toxxyc is offline Official Reseller Enforcer
    Join Date
    Oct 2014
    Location
    Pretoria
    Age
    28
    Posts
    5,371
    Mentioned
    500 Post(s)

    Re: .NET Core 2.0

    Heh. Our 2-week planned upgrade took 8 weeks and the issues are still not all fixed.

  3. #3
    Join Date
    Jul 2010
    Location
    JHB, Houghton Estate
    Age
    35
    Posts
    469
    Mentioned
    16 Post(s)

    Re: .NET Core 2.0

    Yeh 2.0 is still early days...waiting for it to mature more before moving anything over.

  4. #4
    Join Date
    May 2010
    Location
    JHB - East
    Age
    35
    Posts
    333
    Mentioned
    16 Post(s)

    Re: .NET Core 2.0

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •