Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

.NET Entity Framework Core 1.0 RC2

May 24, 2016
Don Schenck
Related topics:
.NETLinux
Related products:
Red Hat Enterprise Linux

Share:

    As .NET Core matures into a production-ready software product, more and more information is becoming available regarding what to expect. While the changes haven't been too big to understand, there are breaking changes and they do require that developers get some education before forging ahead.

    That applies to Entity Framework Core 1.0 (EF Core) as much as any other component of what is broadly termed ".NET Core". Granted, EF Core is not a part of .NET Core -- and neither is ASP.NET, nor MVC -- but all the parts work together and are moving forward. In other words, you need to learn about the .NET Framework and ASP.NET and MVC and EF Core -- not to mention your ongoing education with the today's newest JavaScript framework -- if you wish to remain a leading web developer.

    A Short History Of The (EF) World

    Entity Framework started with version 3.5, which is a neat trick if you think about it. The first two versions, 3.5 and 4, were built into the .NET Framework --- meaning you had to wait until a new Framework release if you wanted any improvements or (shudder) bug fixes. It was the very model of a monolithic framework --- did Gilbert & Sullivan write that? Any tooling for EF was built into Visual Studio.

    Versions 4.x through 5 were a bit of an improvement; the core functions were still baked into the .NET Framework, but new components were available on NuGet. Again, the tooling was available in Visual Studio.

    Version 6.x saw EF completely removed from the .NET Framework --- can you see an evolution here? --- and were made available from NuGet, with any tooling available from the download center. Finally, things were separated and available more quickly.

    With EF Core, things are not just separate, they're even more specific. You don't even get relational database support "out of the box" any more.

    (Seriously; when did you last get software in a box?)

    What does this mean? You write code to get what you want --- I've heard it referred to as "pay to play" --- and you get speed. I've seen decent real-world demos that were 80 percent faster. As Colin Chapman said, "Add lightness". MOAR SPEED!

    Less memory and less CPU usage, too. That's great for mobile applications, sure, but it's also great for cloud-based applications where you pay for CPU cycles.

    What's Missing?

    As you might expect, with a version 1.0 of anything, some things aren't quite ready. Doing without lazy loading, stored procedure mapping, and a robust LINQ translator are prices to be paid for being on the cutting edge. Basic LINQ expressions work fine, but those full-page LINQ queries won't fly just yet.

    You can see a roadmap for EF Core on the EF Core wiki page.

    "Yeah, yeah, let's see some code."

    Example Code: Using a SQL Server Database

    Notice in note 1, you now specifically call out your database provider. In this case, SQL Server with a connection string. This could just as easily have been <code>.UseSqlite(dbconn) to use a SQLite database, as noted in the comments. Again, bits are added only as you need them, saving memory and CPU cycles and improving performance.

    Another performance improvement involves improved SQL statement generation by EF Core. In EF 6.x, if you were writing several records to a database, EF would create an INSERT statement for each record. With EF Core, that's been reduced to one (albeit lengthy) SQL statement. One round trip now, versus N trips before. You can even, if you wish, set the "batch size" for batched commands.

    (Side note: I wanted to capture the generated SQL for a large insert in EF Core, but the Context.Database.Log function is not available in EF Core --- just more evidence of the newness of a version 1.)

    There are other, more in-depth improvements and changes in EF Core; I've provided enough here to get you started. I suggest following along at the github repo to keep up-to-date.

    Finally, you can run this on Windows, sure, but you can really push the envelope if you want to: Grab a zero-dollar, developer's copy of Red Hat Enterprise Linux to run in a Virtual Machine and start writing #dotNETonLinux.

    All The Best,

    -- Don

    For additional information and articles on .NET Core visit our .NET Core web page for more on this topic.

     

    Last updated: March 15, 2023

    Recent Posts

    • Autoscaling vLLM with OpenShift AI

    • Filtering packets from anywhere in the networking stack

    • PostGIS: A powerful geospatial extension for PostgreSQL

    • Kafka Monthly Digest: September 2025

    • A more secure way to handle secrets in OpenShift

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue