From 2793e2b13aeaee7c2b39d87679a3ea8c15c5b082 Mon Sep 17 00:00:00 2001 From: mouaaz Date: Fri, 13 Jan 2023 18:14:15 +0500 Subject: [PATCH] Initial commit --- .../100-framework-basics.md | 13 ++++++++++++- .../101-codefirst-migrations.md | 2 ++ .../102-change-tracker-api.md | 15 ++++++++++++++- .../103-lazy-eager-explicit-loading.md | 16 +++++++++++++++- .../104-orm/100-entity-framework-core/index.md | 10 +++++++++- 5 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/100-framework-basics.md b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/100-framework-basics.md index 5f87516f1..efa509eec 100644 --- a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/100-framework-basics.md +++ b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/100-framework-basics.md @@ -1 +1,12 @@ -# Framework basics \ No newline at end of file +# Framework Basics + +An ORM (Object-Relational Mapping) framework is a tool that maps the objects in an application to the database tables, allowing developers to work with the database using familiar, object-oriented concepts. + +ORM frameworks are tools that map the objects in an application to the database tables, allowing developers to work with the database using familiar, object-oriented concepts such as Entities, Mapping, Context, Queries, Lazy Loading, Change Tracking, and Caching. + +For more resources, visit the following link: + +- [ORM Framework](https://www.h2kinfosys.com/blog/orm-framework/) +- [What are Frameworks in ORM](https://www.killerphp.com/articles/what-are-orm-frameworks/) +- [Essentials of ORM Framework](https://medium.com/@mikependon/the-essentials-of-orm-framework-in-your-software-development-837131efd91b) +- [ORM Frameworks – What is an Object-Relational Mapping Framework](https://onlinecode.org/what-are-orm-frameworks/) \ No newline at end of file diff --git a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/101-codefirst-migrations.md b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/101-codefirst-migrations.md index e05cff14b..224c5e4ef 100644 --- a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/101-codefirst-migrations.md +++ b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/101-codefirst-migrations.md @@ -7,3 +7,5 @@ To use Code First Migrations, you need to enable it in your Entity Framework app Once Migrations is enabled, you can use the Package Manager Console to add a new migration to your application. This will generate a class that contains the necessary SQL commands to update the database schema. You can then use the Update-Database command to apply the migration to the database. - [What is a Code First Migration?](https://www.entityframeworktutorial.net/code-first/what-is-code-first.aspx) +- [Example for Code First Migrations](https://learn.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/) +- [Code First Migrations in Entity Framework](https://www.c-sharpcorner.com/UploadFile/26b237/code-first-migrations-in-entity-framework/) diff --git a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/102-change-tracker-api.md b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/102-change-tracker-api.md index 269fbca83..359d08987 100644 --- a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/102-change-tracker-api.md +++ b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/102-change-tracker-api.md @@ -1 +1,14 @@ -# Change tracker api \ No newline at end of file +# Change Tracker API + +The Change Tracker API is a feature of ORM (Object-Relational Mapping) frameworks, such as Entity Framework Core, that allows developers to track changes to entities and automatically persist them to the database. + +The Change Tracker API is typically exposed through the context class, which is the main class that manages the connection to the database and provides access to the entities. + +When an entity is retrieved from the database, the Change Tracker API marks it as "unchanged". When a property of the entity is modified, the Change Tracker API marks the entity as "modified". And when a new entity is added to the context, the Change Tracker API marks it as "added". + + +For more resources, visit the following links: + +- [Change Tracking in EF Core](https://learn.microsoft.com/en-us/ef/core/change-tracking/) +- [Intro to Change Tracking](https://www.oreilly.com/library/view/programming-entity-framework/9781449331825/ch05.html) +- [ChangeTracker in Entity Framework Core](https://www.entityframeworktutorial.net/efcore/changetracker-in-ef-core.aspxs) \ No newline at end of file diff --git a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/103-lazy-eager-explicit-loading.md b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/103-lazy-eager-explicit-loading.md index 5bbe4d300..67f544677 100644 --- a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/103-lazy-eager-explicit-loading.md +++ b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/103-lazy-eager-explicit-loading.md @@ -1 +1,15 @@ -# Lazy eager explicit loading \ No newline at end of file +# Lazy Eager Explicit Loading + +**Eager Loading** + +Eager Loading helps you to load all your needed entities at once; i.e., all your child entities will be loaded at single database call. This can be achieved, using the Include method, which returs the related entities as a part of the query and a large amount of data is loaded at once. + +**Lazy Loading** + +It is the default behavior of an Entity Framework, where a child entity is loaded only when it is accessed for the first time. It simply delays the loading of the related data, until you ask for it. + +Visit the following links for more resources: + +- [Eager Loading & Lazy Loading](https://www.c-sharpcorner.com/article/eager-loading-lazy-loading-and-explicit-loading-in-entity-framework/) +- [Difference between Eager and Lazy Loading](https://stackoverflow.com/questions/31366236/lazy-loading-vs-eager-loading) +- [Working With Lazy & Eager Loading in Entity Framework](https://dzone.com/articles/working-with-lazy-loading-and-eager-loading-in-ent) \ No newline at end of file diff --git a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/index.md b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/index.md index 16cddf046..54940df44 100644 --- a/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/index.md +++ b/src/roadmaps/aspnet-core/content/104-orm/100-entity-framework-core/index.md @@ -1 +1,9 @@ -# Entity framework core \ No newline at end of file +# Entity Framework Core + +Entity Framework Core (EF Core) is an open-source Object-Relational Mapping (ORM) framework for .NET. It is a lightweight, cross-platform version of Entity Framework, the ORM framework that was part of the .NET Framework. EF Core allows developers to work with relational data using domain-specific objects, eliminating the need to write raw SQL statements. Instead, EF Core provides a set of APIs that can be used to interact with a database, providing a simple and efficient way to perform common database operations such as querying, inserting, updating, and deleting data. + +For more information, visit the following links: + +- [Example of Entity Framework Core](https://learn.microsoft.com/en-us/ef/core/) +- [Entity Framework Core Documentation](https://learn.microsoft.com/en-us/ef/) +- [What are the Basics of Entity Framework Core?](https://www.jetbrains.com/dotnet/guide/tutorials/basics/entity-framework-core/) \ No newline at end of file