Best setup tutorial for this that I've come across so far. I love that you take the time to highlight what certain functions and sections of code actually do.
@zetbit Жыл бұрын
Always happy to help, and I do also believe in that knowing to most of the code will help to become a better programmer and much easier to work with code that we actually know what is doing 😊
@EdgarKnapp7 ай бұрын
Also works for .NET 8 out of the box.
@MsJackkky3 ай бұрын
Thank you, sir! It works for entity framework 8.0.6 as well. Love your style - a lot of information and nothing extra. Definitely like
@thereversejosh Жыл бұрын
Good video, straight to the point with good explanation. I'm currently doing a course on dotnet which uses MySQL for database, but I wanted to use Postgre and I found having this video of only the configuration very helpful. Thanks for this!
@kemalhariz Жыл бұрын
Thanks man, i've been stuck for hours looking on how to do this. With your explanation it also helped me a lot
@zetbit Жыл бұрын
Good to hear! Always happy to help! 😁
@zetbit Жыл бұрын
Support by hitting 2 buttons! Like and Subscribe 👏
@KillTasTiK1 Жыл бұрын
Thanks for the great tutorial. Keep up the good work. 👍
@zetbit Жыл бұрын
Thanks for the kind words! 🙏
@manuelgonzalotoribioruizal1416 Жыл бұрын
Thank you. Watching your video I realized that I forgot the dbcontext
@zetbit Жыл бұрын
No problem 😁
@Brynjar14 ай бұрын
Worked like charm, thanks!
@jannekorhonen62633 ай бұрын
Nice job! Thank you!
@Ya_kruutoy Жыл бұрын
I watched your video and everything became clear thanks, but nevertheless I had to dig into the documentation to understand that your AppDbContext class on the new version looks like this; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; public class ApplicationContext: DbContext { public DbSet Users => Set(); public ApplicationContext() => Database.EnsureCreated(); protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=first;Username=postgres;Password=1"); } }
@zetbit Жыл бұрын
Awesome, thanks for sharing 💪😁
@majormartintibor Жыл бұрын
At the beginning of the video you mention you can set it up in a Blazor Server App. While this is true I want to strongly suggest that in Blazor Server you use: .AddDbContextFactory(options => options.UseNpgsql(connectionString)); dbContext is not thread safe, even for one user when multiple components use the dbContext you can get yourself into a lot of headache. Instead Inject the DbContextFactory into your component and override the OnInitializedAsync, get yourself a dbContext from the factory and safe it in a variable. This way each component gets its own dbContext and you saved yourself the headache while still allowing the dbContext to function as a UnitOfWork.
@zetbit Жыл бұрын
You are completely right, thanks for the tip. I first discovered the factory after this video 😊
@animeamv86418 ай бұрын
saved my life
@xisbie75 Жыл бұрын
I Love you man, you are perfect!
@zetbit Жыл бұрын
Always happy to help 😁
@RohitKumarLadhar8 ай бұрын
Great video Straightforward thing
@zodexnl6 ай бұрын
Many Thanks!! Clear tutorial!!
@neohcheeking75907 ай бұрын
Great tutorial video
@罗思雨-m1t Жыл бұрын
you really help me! thank you very much
@sathishramamurthi815110 ай бұрын
It worked for me . Thank u lot
@EdisonCPP2 Жыл бұрын
Thanks for the video, does it work with application users if you tell it to use Individual Accounts, and OAuth2 database tables for things like Google Sign in? I didn't know if those features were SQL Serve specific or not.
@zetbit Жыл бұрын
I have never tried it. Would be a nice thing to dive into though 😁
@EdisonCPP2 Жыл бұрын
@@zetbit I got it working, nice. I tried it on a sample project before converting a project I have that I had been considering using Postgresql on.
@Pro-wz5mz Жыл бұрын
Thank You.
@zetbit Жыл бұрын
No problem 👌
@brawlboy13826 ай бұрын
it said "Applying migration ''" and tables are empty
@turin_nowadays4 ай бұрын
Thanks a lot!
@abdullahgomaa110 ай бұрын
Thank You
@DevDivine Жыл бұрын
thank you
@zetbit Жыл бұрын
No problem 😁
@mustijack5 ай бұрын
Cool, Thanks
@emcio5 Жыл бұрын
if you have problem with unable to create Simple solution to create empty construction in appdbcontest too and its work
@zetbit Жыл бұрын
Not sure I understand 💪
@426tunn11 ай бұрын
i'm having this erro while trying to install entityframeworkcore: error: Object reference not set to an instance of an object. can someone help pls
@_nfl_nerd_ Жыл бұрын
For the date type what you type in the Model? For example created_at, deleted_at, birth_date ? public DateTime? public DateOnly?