Very good straight forward explanation. Additionally I sometimes use a seperate scaffold folder.
@ionutvlad12 күн бұрын
Very, very nice! I liked the little "hack" at the end with the code-first migration after db-first migration, in order to add the column to the existing table! Nice trick!
@jazzerbyte13 күн бұрын
Nice overview - including the summary of how to transition from DB First to Code First!
@PatrickGod13 күн бұрын
Glad you enjoyed it!
@mejdikarmani724913 күн бұрын
Great job, Patrick! Your video arrives at the perfect time. 👏
@YuvarajUV00112 күн бұрын
Awesome man ❤🔥
@FearGod12313 күн бұрын
Thank You Patrick. Happy New Year!
@tulnaf12 күн бұрын
Thank you Patrick! i'm learning a lot from you! All with a very pleasant guidance and explanation. 10x!!!!
@junaidkhanvibes-jkv721412 күн бұрын
it's just amazing ❤❤
@TheYassha13 күн бұрын
Amazing, thank you!
@arslaninaustria13 күн бұрын
Thank God i subscribed, was looking for exact video
@PatrickGod13 күн бұрын
Thanks for the sub!
@billgauvey532113 күн бұрын
Nice overview Patrick, everyone seems to demonstrate small databases with a few tables. I would love to see a a video using a large database. I have a lot of tables and a whole lot of stored procedures
@10Totti13 күн бұрын
Great tutorial thanks!
@PatrickGod13 күн бұрын
Glad you enjoyed it!
@IraquiRizwanVlogs13 күн бұрын
Amazing ❤
@PatrickGod13 күн бұрын
Thanks 😄
@pierbover12 күн бұрын
Great video! Patrick do you have a video or course on how to setup Identity with a DB first approach?
@partialdata13 күн бұрын
Thank you for the clarification on this topic! What if my project relies on stored procedures?
@rickhoek64169 күн бұрын
Turning SQL Server into a T-SQL DOT APP Server, allowed us to leave the ORM OUT and create CRUD apps instantly with a data driven React Frontend
@icecreamstickmodel11 күн бұрын
"EF Core Power Tools" is still better approach. It is allows to select what tables etc. are imported or updated later. And it contains GUI for Visual Studio.
@luiser201013 күн бұрын
I have used it up to the Net Core 6 version, and it had many performance problems. Has it improved in Net9?
@محمدالشبلاق-ص4ت11 күн бұрын
I think that this is DB First I used it if DataBase is existing and complex schema
@rafazieba998213 күн бұрын
This is not called "the DB First" approach. It would be if you could iteratively modify your db and then automatically modify the conceptual model based on that. If you are just creating your first entities from the DB and then using "the Code First" approach from that point on, it is called "scaffolding". It is unfortunately close to impossible to do "the DB First" approach with EF Core.
@gppsoftware13 күн бұрын
You can do 'DB First' with EF Core. You simply run "dotnet ef dbcontext scaffold" after every db change.
@rafazieba998212 күн бұрын
@@gppsoftware This will override any change I make to the entities. Any "two db tables into one entity" and other changes will have to be done again and again after every scaffold. With old EF you had an EDMX file with conceptual model and mapping from storage model to conceptual model. Based on that the engine knew what was set up and kept it like this. With scaffolding this is generated from scratch every time.
@gppsoftware12 күн бұрын
@@rafazieba9982 That's why if you look at the EF code, it is partial classes. You shouldn't be changing it. That is why it has been built to be compliant with the 'O' of SOLID. What you should be doing is adding extra files of your own code and deriving from the EF classes or attaching to them with partials. You can then do the scaffold and maintain your own code in separate files that are not touched by the scaffold. Put your classes in a separate folder to the models to those EF creates.
@rafazieba998212 күн бұрын
@@gppsoftware It is a good solution but I consider it a "workaround" because it works sometimes but not always. A good example of when you cannot do this is when the numer of tables and the number of entities is different (mapping inheritance). Having said that - never modify autogenerated code. Use partial classes or modify the generation routine.
@gppsoftware12 күн бұрын
@@rafazieba9982 I can't think of a scenario where I have needed to merge two db tables into one entity. To need to do this suggests to me that there is a problem with the data model as a whole. 'Mapping inheritance' suggests to me that you are using something like AutoMapper. The use of this product in itself seems to have created the problem for you: you are saying that EF is no good because Automapper won't do what you want. Well don't use a mapper then! Personally, I don't use mappers (I code the copying) because run-time reflection-based mapping yields poor performance.