Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.69 KB

File metadata and controls

43 lines (29 loc) · 1.69 KB

DotNet Entity Framework Core - Database First Approach Sample

In this approach, we create database first then model our entities either manually or using scaffolding. This approach is useful when we work with an existing databases.

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
.Net Core MVC
.Net Core Razor Pages
EFCore - Get Started
EFCore - Model from DB
EF Core - Razor Pages

🔥 Happy Coding