C#: Dependency Injection - это просто. Базы данных в .Net Core - видео HD

C#: Dependency Injection - это просто. Базы данных в .Net Core - видео
00:16:02

12n.ru 16641 ролик

Dependency Injection - это просто. Базы данных в .Net Core - видео.

Visual Studio c#. Подробная инструкция по работе с базой данных MS SQL в .Net Core 5.0 через Dependency Injection

Шпаргалка в закрепе

RSS
c# учимся вместе
18:39
+1
Шпаргалка :)
Nuget Packages:
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Design

Startup.cs:
services.AddDbContext(options =>
options.UseSqlServer(Configuration.GetConnectionString(«LearningTogether»)));

Appsettings.json:
«ConnectionStrings»: {
«LearningTogether»: «Server=.\\EXP2019;Database=LearningTogether;Trusted_Connection=True;»
},

LtContext.cs:
public LtContext(DbContextOptionsoptions): base(options){}

Команды
EntityFrameworkCore\Add-Migration 'Initial'
EntityFrameworkCore\Update-Database