Hello folks, I am writing an article on WEB API with Entity FrameWork in .NET Core.
So this is the 1st article where i will explain about .NET Core, Entity-framework
This article is divided into 3 parts:
Part 3: Create Web API.
So this is the 1st article where i will explain about .NET Core, Entity-framework
What is .NET Core :
.NET Core is a cross platform, open source re-implementation of the .NET Framework. It is actively maintained by Microsoft. It is cross-platform framework to build applications for all operating system including Windows, Mac, and Linux.
What is Entity FrameWork :
Prior to .NET 3.5, developers often used to write ADO.NET code to save or retrieve application data from the underlying database. We used to open a connection to the database, create a DataSet to fetch or submit the data to the database, convert data from the DataSet to .NET objects or vice-versa to apply business rules. This was a cumbersome and error prone process. Microsoft has provided a framework called "Entity Framework" to automate all these database related activities for your application.
Entity Framework is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects.
Entity FrameWork Core :
It is the new version of Entity Framework after EF 6.x. It is open-source, lightweight, extensible and a cross-platform version of Entity Framework data access technology. It is an enhancement to ADO.NET that gives developers an automated mechanism for accessing & storing the data in the database.
EF Core supports two development approaches 1) Code-First 2) Database-First.
In the Code-First Approach, Entity Framework Core API creates the database and tables using migration based on the conventions and configuration provided in your domain classes. This approach is useful in Domain Driven Design (DDD).
In the simple language, we can say it create our DataBase from class using commands.
In the Database-First Approach, Entity Framework Core API creates the domain and context classes based on your existing database using Entity Framework Core commands. This has limited support in Entity Framework Core as it does not support visual designer or wizard.
In the simple language,we can say it create classes from our DB.
Prerequisites:
For this series you will need:
For this series you will need:
- Sql Server (SSMS)
- .NET SDK
- Visual Studio 2017 or Visual Studio 2019.
No comments:
Post a Comment