Introduction to Entity Core Framework in C# and EF
Entity Core Framework is a powerful ORM tool that integrates C# classes with relational database tables, enabling seamless interaction between application code and database. It simplifies database operations, supports code-first and data-first approaches, and automates SQL query generation. Its applications range from data agnostic console applications to MVC web applications, making it a versatile tool for data management in various application scenarios.
Download Presentation
![](/assets/img/so-down.gif)
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Entity Core Framework Jim Fawcett CSE686 Internet Programming Spring 2019
Introduction Entity Core Framework is: Cross-platform: Windows, Linux, macOS An Object Relational Mapper (ORM) A wrapper that associates C# classes, that satisfy certain conventions, with relational database tables and their relationships. A mechanism for: building database instances from C# classes (Code First) building C# models from existing databases (Data First) auto generating SQL queries
https://www.dotnetcurry.com/entityframework/1348/ef-core-web-api-crud-operationshttps://www.dotnetcurry.com/entityframework/1348/ef-core-web-api-crud-operations
Applications Entity Core Framework can be added to: a data agnostic application, e.g. a console application An application that is scaffolded for data management, e.g., MVC web applications EF is most frequently used for Asp.Net Mvc and Asp.Net Core Mvc applications.
Enabling Entity Framework Create a C# Web Application and add EF scaffolding manually That was how Mvc-Skeleton with CRUD using EF was built. Create a C# Asp.Net Core Mvc Application with individual user accounts for Authentication. That adds most of the EF scaffolding you need automatically. That assumes that you have installed Visual Studio 2017 with the needed packages. Some of the tutorials cited on the lecture page lead you through the process of installing anything that is missing.
Code First Define model classes in Models folder Follow naming conventions to define keys In nuget pkgmgr console: Add-Migration [context] Update-Database Builds/updates database https://www.tutorialspoint.com/entity_framework /entity_code_first_approach.htm