🚀 Join the .NET Web Academy with a 30% discount - closing soon! 👉 www.dotnetwebacademy.com/courses/academy?coupon=dnwas23yt
@hyd1195 ай бұрын
If you are interested in getting paid something and helping me get used to some legacy dotnet core things let me know :)
@CiaranCorrigan862 жыл бұрын
Great coincidence; this is exactly what I am looking for right now after watching an older video of yours last night, about WebAPI & EFCore.
@PatrickGod2 жыл бұрын
Perfect! Glad I could help! 😄
@OmPrakash-rs4jm2 жыл бұрын
I was eagerly waiting for db first approach. thanks alot Patrick.
@UmeshWaghmare-k4u5 ай бұрын
Your videos are incredibly practical and easy to understand. Thank you so much for sharing such valuable content!
@pw.70 Жыл бұрын
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'.
@sidakgujral2768 Жыл бұрын
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
@daviddonadze221 Жыл бұрын
Thank you so much for a nice video. I needed to remind myself DB-first approach. U the best
@PatrickGod Жыл бұрын
You're so welcome!
@nelsonrivers85462 жыл бұрын
Was waiting for this. Thank you.
@johngumboc6842 жыл бұрын
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.
@ReelSkilla2 жыл бұрын
woooo finally!! :)
@Tamer_Ali Жыл бұрын
Thanks Patrick for this awesome video. I hope you create a video about using EF Core Power Tool
@marna_li2 жыл бұрын
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.
@horaciodelgadillo9 ай бұрын
Wow.. este fue un excelente video, gracias!
@CAPS_AMERICA2 жыл бұрын
Another good learning material from you! Thank you for sharing your knowledge!
@PatrickGod2 жыл бұрын
Glad I could help! Thanks for your feedback, Jack! 😊
@thotchs41162 жыл бұрын
i wating for this conten for a long long time. finally ;)
@ersangokalp2002 жыл бұрын
Dapper would be great to learn 🙏
@elliottwavechina721 Жыл бұрын
more topics about code first, but less for database first which is more commonly used , your video is very helpful
@The_Ethical_Slacker Жыл бұрын
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.
@dianatorrontegui75052 жыл бұрын
Great content, thanks!!
@PatrickGod2 жыл бұрын
Glad you liked it! Thanks for your feedback! 😊
@MitroiBogdan-ef3ei8 ай бұрын
10:30 Why is class User defined as virtual : public virtual User User {get; set;} ???
@aussieraver7182 Жыл бұрын
Legend!
@mandarkarnik2 жыл бұрын
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?
@inanogluahmet22 жыл бұрын
What to do if table columns in database are changed later?
@nittinaggarwal10682 жыл бұрын
Very nice video. I just want to know how we can call the stored procedure as well using the same code above.
@المعماريعُمرالعُمري2 жыл бұрын
It's just awesome
@RockoShaw10 ай бұрын
what about the username and password>? how does that is input into the PM console to be able to retrieve the context?
@nelsonrivers85462 жыл бұрын
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 ?
@egulsever Жыл бұрын
After scaffolding I want to be able to add a new column to Product table following code-first and add-migration. Is that possible?
@khubaibquadri7977 Жыл бұрын
What does virtual keyword does with the attributes?
@eugenekim18612 жыл бұрын
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.
@shivakumarnarayanan1165 Жыл бұрын
Have u found a tutorial that covers more real world examples?
@eugenekim1861 Жыл бұрын
@@shivakumarnarayanan1165 Unfortunately no. Most YT tutorials are not covering real-world examples but just simple/basic ones. If I have one, I WILL subscribe to their channels and give them thumb-ups FOR SURE. Anyway, I wish to find one on GitHub or somewhere.
@memoriesofold9591 Жыл бұрын
what if I add another table in the database, how can I update the scaffold to insert the new table?
@troymitchel4790 Жыл бұрын
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.
@NadunUdana Жыл бұрын
absolutely
@unskeptable2 ай бұрын
You can go db first to build the entities and then continue code first
@angelachoi3695 Жыл бұрын
Thank you!!
@PatrickGod Жыл бұрын
You're welcome!
@rajeshkubhardwaj2 жыл бұрын
Scaffold-DbContext command with sybase database for NET 6 Database First Approach ?
@AbrahamWilson2 жыл бұрын
Hey Patrick, thanks for making another amazing video, I do have a video request, can you make a series on Dapper
@marshallnyamadzawo8553 Жыл бұрын
How do you create a view with code first?
@sahitkarale2 жыл бұрын
How do I scaffold using IdentityDbContext instead of DbContext because I want to use some of IdentityDbContext features
@sarwalgaurav2 жыл бұрын
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.
@normanaranez3232 жыл бұрын
do you have any idea how to create multiple database base on tenant or subdomain? i mean if we select tenant/subdomain use database intended for that. thanks
@christoffermartell1932 жыл бұрын
Great video.
@mohammadmaninang37662 жыл бұрын
I have a existing database with tables but those tables will not be part of the project. Should I use code first or database first but the requirement is to use that database. I was wondering if I use code first will it delete the other tables??
@MehmetAliEGE2 жыл бұрын
Thanks God. In both senses. :)
@PatrickGod2 жыл бұрын
You're very welcome! 😄
@HeinzBigler2 жыл бұрын
Interesting video. What about Stored Procedures, what would be the best practice here? Migrate them to C# methods?
@PatrickGod2 жыл бұрын
Hey Heinz, it seems this might be a good option. EF Core seems to be very limited regarding stored procedures. For instance you can only return Entities and you can't use Joins in your stored procedure according to the documentation. Hope this helps! Take care, Patrick
@joecasa192 жыл бұрын
I personally would create custom entities to receive the output of stored procs that return data and then use the open source package Dapper to call execute the procedures. You can still use your DbContext connection to execute the procedures. For stored procs that perform operation but don't return anything, Execute with Dapper again using your DbContext connection. You don't get the benefits of caching that EF gives you but compared to the huge boost in performance, just remember and be aware that you should recycle the DbContext before doing an EF query where the execution of your stored proc may have altered the data that was previously retrieved by EF. If everything your app needs to do with the DB is already written as views and stored procs, consider had rolling your entities and use Dapper instead of bringing EF into the mix. Your users will appreciate the performance difference.
@prabhagarann840 Жыл бұрын
Using database first approach can we create a new database which has the schema of existing database? if that's possible can u make one vedio?
@lv94792 жыл бұрын
Hello, as usually it is very usefull. I got the same problem of object cycle with our oracle database but the swagger is completly stucked in our case. I set the JsonIgnore and it's OK.
@SuperOazy2 жыл бұрын
Perfect; thanks a lot.
@RunningDigger2 жыл бұрын
thank you very much!
@angelcasanchez72292 жыл бұрын
patrick a video about code first migration minute 19:47 please thank you very much
@mdarif-rt9mg2 жыл бұрын
Hi Patrick, would be interested to if you can show us demo on building api using Db first ef core as i would like to expose the data from oracle database , basically to a thrid party using basic authentication.
@sagarmajumdar922 жыл бұрын
Hi Patrick. Will you be making a tutorial on dotnet Web API Versioning and configuring Swagger for versioning ?
@delightful730 Жыл бұрын
Need Get Data from Multiple Tables with join Query, DB First Approach, MVC, Not Repository Parrten
@thedude6810 Жыл бұрын
That was helpful
@Dartarok9992 жыл бұрын
patrick god, could you help me, making a video explaining how to save multiple files with inputfile but save them in a local folder and show that local path in the database, it would be very helpful since I've been trying for a long time...with blazor webassembly
@fadyosama46422 жыл бұрын
thanks helpful vid
@PatrickGod2 жыл бұрын
Glad you liked it!
@jdelgado10252 жыл бұрын
Is an updated version of the Full Stack class coming out soon using .NET 6 and EF6?
Hi thanks for the vid, can you have 2 db connections ?
@bobchu53144 ай бұрын
Please make a tutorial do EF6 Database First with DB is SQLite
@MohammadKomaei2 жыл бұрын
This is not a good reason to use code first , we can set a setting just one place in program.cs file: builder.Services.AddControllersWithViews() .AddControllers(options => options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles);
@ConsolacionCapstoneProject Жыл бұрын
wheres the file for the database table
@vtminhlien88402 жыл бұрын
Now let work with session to build simple admin web, tks you very much
@rogeriolima81525 ай бұрын
In real world, inside companies, I will almost NEVER be allowed to run a program that make changes in DB structure (this is unthinkable), as code first does. But database first... well ok maybe we can use.
@princesarno26522 жыл бұрын
Mine looks notNice tutorialng like the way you guys started it would be amazing if soone told how to get the multiple tracks