Entity Framework Core Database First Getting Started Basic Crud Operations Easy

preview_player
Показать описание
If stuff is blurry - maximize the video and set it to 1080p.

Create Employee Table
--------------------------------------
CREATE TABLE [dbo].[Employee](
[EmployeeId] [int] IDENTITY(1,1) NOT NULL,

[FirstName] [varchar](50) NOT NULL,

[LastName] [varchar](50) NOT NULL,

[JobTitle] [varchar](100) NOT NULL,

[Salary] [varchar](20) NOT NULL,

[Active] [bit] NULL,

CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED

(

[EmployeeId] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

Entity Framework Core Nuget Packages
----------------------------------------------------------------
(all v3.0.1)

Microsoft.EntityFrameworkCore

Microsoft.EntityFrameworkCore.SqlServer

Microsoft.EntityFrameworkCore.Tools

Nuget Package Manager Console Command
---------------------------------------------------------------------------
Scaffold-DbContext "Server=YourSQLServerGoesHere;Database=YourDatabaseNameGoesHere;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Database
Рекомендации по теме
Комментарии
Автор

thanks, best and easy to understand guide for EF core so far.

baradongkamatis
Автор

thumbs for your reference to sleepy joe! :) Oh, and the guide was awesome too.

bendunaway