EF Core 6 🚀 Database First / DB First (Entity Framework Core 6 / .NET 6)

preview_player
Показать описание
🚀 Join the .NET Web Academy with a 30% discount - closing soon!

Table of Contents:
00:00 EF Core 6 🚀 Database First
01:55 SQL Server Database Overview (SQL Server Management Studio)
04:05 Create an ASP.NET Core Web API Project
04:50 Install NuGet Packages
06:04 Scaffold the DbContext
08:44 Check the created Models
11:16 Create an empty API Controller
13:42 First Test of the Controller
15:18 Include Related Entities
17:00 Scaffold after making changes to the Database
19:01 DB First Alternative?
21:09 Use the dotnet CLI
23:21 Closing Words

🙏MANY THANKS TO THESE LOVELY PEOPLE:
James Goforth
@williamdevine
Doug Nelson
Arif Hasanov
@kohji1712
@dlb78dlb
Thomas Korsgaard
FastTrak
Jeff Sager
Dan Moyer
AlgoMarket
Mennskr
Mehmet Ali Ege
Simon
Hermann Rösch
Jim McNeal
Kieron
@mgrainger231
Gerrit Esmeijer
Axel
Kareem Skinner
Joaquim
Alain Legrand
Per Rieland
@prodrigu75
Greg
Brendan Maunder
Stageoner
Andrew Campbell
pascalditzfeld
PovilasSimanskas
Ameet Jayawant
jenö
Marco Otilli
Mark
l33ter
alibux
Luke Vincent
mrcl
Alain Legrand
Thomas Werner
István Csibor
Grant Burdon
@gianluigiconti
Gerrit Esmeijer
Illia
Németh-Pók István
Michael Mel
Marko Zdilar
GerryB
@DADA_universe
Domen Hren
@heroesch
Carey
Peter De Tender
Baris Keskin
@Big_Bear_27390
Mathias
walter e watkins
Günther Dassel
Axel
Josh
Daniel Huber
Fredric Adell
Juan Carlos
Manolis
Pajani
P.
Jonas Granlund
Bobby
Kristina
@xamarin007

#DotNet #EfCore #PatrickGod
Рекомендации по теме
Комментарии
Автор

🚀 Join the .NET Web Academy with a 30% discount - closing soon!

PatrickGod
Автор

Great coincidence; this is exactly what I am looking for right now after watching an older video of yours last night, about WebAPI & EFCore.

CiaranCorrigan
Автор

I was eagerly waiting for db first approach. thanks alot Patrick.

OmPrakash-rsjm
Автор

Your videos are incredibly practical and easy to understand. Thank you so much for sharing such valuable content!

UmeshWaghmare-ku
Автор

Love your videos. Sometimes your only choice is DB First when your dealing with an existing database. I have had success using partial classes in a separate metadata and partial class cs files with the annotations in a Metadata.cs, that way your data annotations don't get wiped out when you run another scaffold-dbcontext command.

johngumboc
Автор

Thank you so much for a nice video. I needed to remind myself DB-first approach. U the best

daviddonadze
Автор

Thanks patrick God a lot of love from INDIA I have leant so many things in dotnet core 6 for my work i love your tutorials easy and fast keep it up

sidakgujral
Автор

I used to work for a guy who insisted we would design the database-first. In that way he, the owner/business analyst/database administrator, could modify the structure as he imported customer data - and that is is more efficient. Essentially, he wanted control. So I scaffolded it initially. We were developing in the production database.

marna_li
Автор

Very nice video. I just want to know how we can call the stored procedure as well using the same code above.

nittinaggarwal
Автор

Can you make a video with a practical/real-world example of EF such as using views, and complex relationships with multiple tables, rather than using simple DB schema? That would be much helpful.

eugenekim
Автор

Nicely informative, thank you.
I think the big thing I take from this... you touch on this a little throughout but especially at the end... is the fragility of the link between code and database. For me, this makes me ask... do I *want* the code to know about the database? Because someone's going to change the database without telling anyone, and it's going to break the application.
Okay, there needs to be *some* knowledge between the two, just for the solution to work, but we should probably aim for that knowledge to be minimal.

The_Ethical_Slacker
Автор

Thanks for creating this Patrick. Really helpful. Don't most high revenue companies already have existing databases? Wouldn't DB first approach be the most common way anyways? Code first is usually for teaching or for creating brand new databases. I seriously doubt that most companies are allowing people to create a new database every time they need software written.

troymitchel
Автор

i wating for this conten for a long long time. finally ;)

thotchs
Автор

Thanks Patrick for this awesome video.
I hope you create a video about using EF Core Power Tool

Tamer_Ali
Автор

Another good learning material from you! Thank you for sharing your knowledge!

STUPIDYOUTUBE_HIDINGMSGS
Автор

Thanks for this video, its simple and well explained, can you please share how can we take this scaffold database context and migrate to code first for any further changes to database, like adding new tables or changes to existing tables etc.

sarwalgaurav
Автор

Just as a note, the classes used for the automated build of these classes are all defined as public partial. That means that any extended properties and functionality can be attached to the model classes. I tend to do this in a folder called 'Extenders'.

pw.
Автор

more topics about code first, but less for database first which is more commonly used, your video is very helpful

elliottwavechina
Автор

What about Editor like earlier .net framework 4.7.2 EF 6. editor? How to use store procedure based approach with .net COre EF? If my table consists for billions of records, I do not want to use table based approach? Any simple editor available?

mandarkarnik
Автор

With Dapper, one issue is that is does not provide "concurrency checking". Can you address how to handle "concurrency issues" that could arise when using Dapper to do UPDATE, INSERT, DELETE operations ?

nelsonrivers