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.
Database Providers
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!
Learn More
Watch video: How to Create and Configure a Model in .NET Entity Framework Core Using Fluent API (Code First)
Watch video: What is Entity Framework and what are its Benefits?
Watch video: Entity Framework: Getting Started – Complete Beginners Guide (Course Preview)
Featured Online Courses:
- AI Essentials: A Beginner’s Guide to Artificial Intelligence
- SQL Server 2022: What’s New – New and Enhanced Features
- Working with Python on Windows and SQL Server Databases
- Introduction to Azure Database for MySQL
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- Data Management for Beginners – Main Principles
- 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
- …more
Read also:
- 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
- Tip of the Week No.19 – What is the Database First Workflow in Entity Framework?
- 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)
© SQLNetHub
Artemakis Artemiou, a distinguished Senior Database and Software Architect, brings over 20 years of expertise to the IT industry. A Certified Database, Cloud, and AI professional, he earned the Microsoft Data Platform MVP title for nine consecutive years (2009-2018). As the founder of SQLNetHub and GnoelixiAI Hub, Artemakis is dedicated to sharing his knowledge and democratizing education on various fields such as: Databases, Cloud, AI, and Software Development. His commitment to simplicity and knowledge sharing defines his impactful presence in the tech community.