GithubHelp home page GithubHelp logo

nayanbunny / dotnet-entity-framework-core-sample Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 4.0 1018 KB

.Net 6 Entity Framework Core Approch Sample

License: MIT License

C# 56.78% HTML 31.67% CSS 1.52% JavaScript 3.63% TSQL 6.41%
c-sharp dotnet dotnet-core entity-framework entity-framework-core mvc webapi webapp code-first database

dotnet-entity-framework-core-sample's Introduction

DotNet Entity Framework Core Sample

Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology.

EF Core can serve as an object-relational mapper (O/RM), which:

  • Enables .NET developers to work with a database using .NET objects.
  • Eliminates the need for most of the data-access code that typically needs to be written.

EF Core supports many database engines, see Database Providers for details.

Entity Framework development approaches:

  • Code First
  • Code First - Fluent API
  • Database First
  • Model First

EF Core Development Approach

Entity Framework Development Approach Decision

EF Core Development Approach Decision

Entity Framework development approaches in .NET Core

Feature Code First Code First - Fluent API Database First Model First
Definition Create a database from the model, and then add data to the database. Create a database from the model, and then add data to the database. ModelBuilder class acts as a Fluent API. Creating entity & context classes for an existing database. Create a new model using the Entity Framework Designer and then generate a database schema from the model.
Suitable Application Greenfield / Brownfield Greenfield Brownfield Greenfield
Application Size Small Small Large Small / Medium
Data Intensity No No Yes No
Version Control Yes Yes No Yes
GUI No No Yes Yes (Slow / Laggy)
Code Development Ease Ease Moderate Moderate
DB Maintenance Moderate Moderate Ease Bit Hard (Laggy GUI)
Query Data LINQ LINQ LINQ / Stored Procedure LINQ

Language : C#
.Net Version : >=6.0

Pre-Requisites

  • Visual Studio IDE
  • Microsoft SQL Server
  • Azure Data Studio / SQL Server Management Studio (SSMS) / SSDT for Visual Studio

Scenario

  • Database with tables:
    • Departments (Departments data like Name, IsActive)
    • Employees (Employee data like Name, Email, Phone, DepartmentId, IsActive)
    • Skills (Skills data like Name, IsActive)
    • EmployeeSkills (Relation Mapping between Employee and Skill)
  • Each Employee belongs to a department and can have multiple skills.

Execution & Implementation Steps

References

EntityFrameworkCore
Entity Framework Core Tutorial
EF Core and EF6
.Net Core MVC
EFCore - Get Started

๐Ÿ”ฅ Happy Coding

dotnet-entity-framework-core-sample's People

Contributors

nayanbunny avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.