In this article, you will learn what Entity Framework Core is and how to enable it in your C# Projects in Visual Studio. Entity Framework Core, is the Cross-Platform version of ADO .NET Entity Framework. In one of my older articles, I have provided an introduction to Entity Framework. Entity Framework Core, as mentioned above, is its cross-platform version, and that means that it can run, not only on Windows, but also on Linux and macOS.
.NET Core is a Prerequisite for Entity Framework Core
In order to use Entity Framework Core on Windows, you need .NET Framework (Windows) and in order to use Entity Framework Core on Linux or macOS, you need .NET Core. You can find all available .NET Framework versions on the official website.
More about Entity Framework Core
Entity Framework (EF) Core, can be used with .NET Core applications, but also with .NET 4.5 (or later) applications and you can find its latest release here.
When it comes to comparing the features between Entity Framework 6.x and Entity Framework Core, note that some features of EF 6.x are still missing from EF Core, but they are being gradually added.
In order to compare the features offered in these two versions of Entity Framework, you can check the comparison matrix for EF Core vs EF 6.x.
Available Workflows in Entity Framework Core
The available Workflows in Entity Framework Core, are Code First and Database First.
Code First Workflow
The Code First workflow, is based on a Domain Driven Design. To this end, you create the domain classes based on which the database can be created in the background. Moreover, note that you can use Fluent API for defining your domain classes, as well as, use Data Annotations.
Database First Workflow
The Database First workflow is different. Based on this workflow, you create a model in Entity Framework, by reverse-engineering an existing database. Therefore, based on the database schema, a corresponding schema is also created in Entity Framework, as your Entity Data Model.
Learn More About Entity Framework – Enroll to the Course!
We recommend that you check our online course “Entity Framework: Getting Started – Complete Beginners Guide“.
Via the course, you will learn all about Entity Framework, what it is, how it works, how to use it for data access when developing .NET apps, what are its available workflows and their pros and cons. Also, via comprehensive live demonstrations, we will build many apps using Visual Studio with C# and Entity Framework.
Entity Framework Core, like Entity Framework, allows fetching data from a plethora of data sources. In order to make this possible, you need to use database providers. On this link, you can find more information about the available database providers for Entity Framework Core.
In order to add a database provider in your Entity Framework Core project, you can use any of the below 2 options:
- Option 1: Use the Console
- syntax: dotnet add package provider_package_name
- Option 2: Use NuGet Package Manager Console in Visual Studio
- install-package provider_package_name
Learn More About Entity Framework Core – Watch the Video!Enroll Now with Discount!
Featured Online Courses:
- Boost SQL Server Database Performance with In-Memory OLTP
- Essential SQL Server Administration Tips
- SQL Server Fundamentals (SQL Database for Beginners)
- Essential SQL Server Development Tips for SQL Developers
- The Philosophy and Fundamentals of Computer Programming
- .NET Programming for Beginners: Windows Forms (C#)
- Introduction to Data Science and SQL Server Machine Learning
- Introduction to Azure SQL Database
- SQL Server 2019: What’s New
- Entity Framework: Getting Started (Complete Beginners Guide)
- How to Import and Export Data in SQL Server
- Get Started with SQL Server in 30 Minutes
- A Guide on How to Start and Monetize a Successful Blog
Check our other related Entity Framework and .NET articles:
- .NET Programming for Beginners – Windows Forms (C#)
- Entity Framework: Getting Started (Complete Beginners Guide – Online Course)
- The Entity Framework – Part 1 – Introduction
- The Entity Framework – Part 2 – Inheritance
- The ADO .NET Entity Framework
- Screencast: How to Create an Entity Data Model
- Screencast: Using Inheritance in the ADO .NET Entity Framework
- Entity Framework: Code First
- The Net.Tcp Port Sharing Service service on Local Computer started and then stopped
- Using the C# SqlParameter Object for Writing More Secure Code
- Cannot declare instance members in a static class
- Cannot implicitly convert type ‘string’ to ‘System.Windows.Forms.DataGridViewTextBoxColumn
- Microsoft SSIS Service failed to start. Configuration system failed to initialize
- What’s New in SQL Server 2019
- Learn Azure SQL Database: Creating your First Database
- Getting Started with SQL Server on Linux
- How to Create an Azure SQL Server Virtual Machine
- How to Backup a SQL Server Database from On-Premises to Azure Storage
- What is Azure Advisor?
Check our latest software releases!
Easily generate SQL code snippets with Snippets Generator!
Convert static T-SQL to dynamic and vice versa with Dynamic SQL Generator.
Secure your SQL Server instances with DBA Security Advisor.
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018) and a Udemy Instructor. He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.