Codewrinkles

Codewrinkles

Your daily does of #DotNet videos. We cover a wide variety of topics like #AspNetCore, #Blazor, EntityFramework Core, software architecture and so much more. You'll also find here regular live coding sessions.

Numeric data types

Numeric data types

Microfrontends with Blazor

Microfrontends with Blazor

Пікірлер

  • @setdetnet5001
    @setdetnet5001Күн бұрын

    First off, well done! You nailed the issue but missed one PIVOTAL explanation. You used CreateDbContextAsync .... VITAL to understand this here and subtly different than CreateDbContext (sync method which is NOT thread safe). One should NEVER use the CreateDbContext sync method in concurrency - which you have not so well done but please explain this in your demo. :)

  • @guyonfellow
    @guyonfellow2 күн бұрын

    Good information but background music is distracting

  • @AmortizedLogN
    @AmortizedLogN2 күн бұрын

    Great video. However, won't using per-operation dbcontext or a transiant DBContext take away all the benefits of using EF Core? Such as lazy-loading, Change Tracking, First-Level Cache, Unit of Work... At that point EF Core just becomes an ORM. And since scoped DBContext doesn't work well with Server-side Blazor at all, it requires implementing something custom, with some kind of Context Locator that allows to use one DBContext per business operation/transaction.

  • @Lazzerman42
    @Lazzerman422 күн бұрын

    if you set the Authorize attribute on the Home.razor it will redirect to login ? I can't see the problem? You may want some pages (like the login page) to be open and some some to require login

  • @tapesteer
    @tapesteer4 күн бұрын

    You didn't provide a full explanation here. How do you register the pipeline behavior so that it is used by mediatr for example? If you use blazor and you have a dbContextFactory instead which is Scoped, will this pipeline still work considering that here you set the context instance to be transactional, but each handler in blazor will have it's own context then so doing it here is redundant unless you somehow pass the same context down the pipelines.

  • @luceniosm
    @luceniosm4 күн бұрын

    Great, this solution solve my task. thanks

  • @Kanfutizer
    @Kanfutizer6 күн бұрын

    Wow thanks was struggling with this for sometime. Couldn't find any easy to understand info about this flow by google. Thanks alot! This must make my development experience with Azure easier if I encounter any bugs in the future, just if.

  • @lucasgiunta8874
    @lucasgiunta88746 күн бұрын

    I'm sorry but it's not micro front end module federation. You are just playing with reference between local project. But what about share in runtime component between app's writed in React/Angular or any other stack ? How are you exposing blazor component to another application like React ? The point of mcfe, it shouldn't be scope to the stack as it is just javascript file which is expose. How do you do that with Blazor ?

  • @anthonyanthamatten
    @anthonyanthamatten7 күн бұрын

    Thanks for the concise instruction.

  • @user-hj6bb9my1f
    @user-hj6bb9my1f7 күн бұрын

    Thanks for your video codewrinkles. Why are not uploading?

  • @beloaded3736
    @beloaded37368 күн бұрын

    Best lesson on this topic I have seen. Thanks sir

  • @magisteriumemporium1411
    @magisteriumemporium14119 күн бұрын

    Holy molly. Thank you Code wrinkles <3

  • @sighupcmd
    @sighupcmd9 күн бұрын

    I heard so many people struggling with Aggregate term, but all I see is just a classic GoF Facade done right.

  • @przemosz7337
    @przemosz733713 күн бұрын

    nice video, it will be nice if you add a information that you cna disable those errors using pragma statement that i sometimes very usfeull during only a development

  • @Pozetivchil
    @Pozetivchil15 күн бұрын

    Thank you very much! Only after YOU i understand this theme! I love you! Thank you again!😘

  • @ghevisartor6005
    @ghevisartor600515 күн бұрын

    What if you have Policies and AuthorizationRequirements? Is the NotAuthorized of the Routes.razor invoked? I wish there was a <NotAuthenticated>. Even adding policyBuilder.RequireAuthenticatedUser() doesn't do much, it will still invoke the Requirement handler for example, in which you can't do much. If you specify a policy in the [Authorize(PolicyName)] it stop doing the automatic redirect. Any suggestion?

  • @ButuGruv
    @ButuGruv15 күн бұрын

    Is there a way to do this in the new .NET 8 Blazor Web App?

  • @DavidThielen
    @DavidThielen15 күн бұрын

    thank you - very helpful.

  • @gunnypaulgiles
    @gunnypaulgiles17 күн бұрын

    I error out with exception unhandled highlighting var app = builder.Build(); I am new and trign to use VS 2022 nwet 7 server.

  • @semen083
    @semen08318 күн бұрын

    Does logger scope matters when using plain text log files, not seq?

  • @samdorn2833
    @samdorn283319 күн бұрын

    This one is an integration test. Unit tests must not depend on external dependencies like a database

  • @AurelioCE88
    @AurelioCE8819 күн бұрын

    Nice video, can i use minimal api in azuee function?

  • @tapesteer
    @tapesteer20 күн бұрын

    Why do you make an API endpoint for thenlogout button? Why bot directly call the SignInManager in the component

  • @nelsonrivers8546
    @nelsonrivers854620 күн бұрын

    Can you add a video that shows how to go about doing the "Refresh Token" part of this ? It would be much appreciated.

  • @DurgeshMarathe-zb3ge
    @DurgeshMarathe-zb3ge20 күн бұрын

    Awesome tutorial, quick, simple, and yet covers everything. Brilliant Sir! this exactly that i want

  • @farzadjamshidicom
    @farzadjamshidicom21 күн бұрын

    Thank you :)

  • @tapesteer
    @tapesteer22 күн бұрын

    Something that I've been fighting to figure out for the past week and I hope you can spare some time to answer this. I got the antiforgery to work using the <Antiforgery/> element. This sets the cookie in the client header and then also in the request body. If however I want to not use a <form> element but instead to the logout using a method, I need to create an HttpClient instance, generate the antiforgery tokens using GetAndStoreTokens with the HttpContext and then create the request. The issue is that this request is bad because the HttpClient is missing the Header XSRF-TOKEN and the request is evaluated as invalid. How can we create valid http requests using antiforgery tokens using the programatic approach? I have not found any answer for this yet. The documentation from asp.net says to simply add the header with the name, but doing this still returns a "BadRequest" response.

  • @ghevisartor6005
    @ghevisartor600523 күн бұрын

    does it also update the @page component itself for the [Authorize] attribute? so you get the NotAuthorized view on the whole page component?

  • @farzadjamshidicom
    @farzadjamshidicom23 күн бұрын

    Thank you so much.

  • @AjeetKumar-cy1ij
    @AjeetKumar-cy1ij23 күн бұрын

    nice video

  • @zoranProCode
    @zoranProCode24 күн бұрын

    What is cancelation token, how it's used?

  • @farzadjamshidicom
    @farzadjamshidicom24 күн бұрын

    Can we use create user profile handler in the register handler? Because one part of registration is creating user profile.

  • @danurarya0823
    @danurarya082325 күн бұрын

    Never know filter can be used to do many useful things, thanks for sharing your knowledge

  • @lightstream78
    @lightstream7825 күн бұрын

    What if you want to have the best of both worlds, one single Windows service that hosts the long running background process as well as the minimal API to accept simple commands from a client to stop or pause the process for example? Can it be one in one single windows service instead of two?

  • @omahb
    @omahb25 күн бұрын

    Wonderfull, Thank you :)

  • @yassermian9913
    @yassermian991326 күн бұрын

    I made an app in blazor server. If i display an invoice # 1 with detail rows and switch to invoice #2. then i if i go to DB back end and change Qty from 1 to 2 of Invoice #1 using update query. Now if i retrieve invoice #1 again in UI it still shows me old Qty and not Qty=2. Ever since I am using DBContextFactory this problem is gone.

  • @rvscootin3457
    @rvscootin345727 күн бұрын

    Thanks!

  • @OlehYevseienko
    @OlehYevseienko28 күн бұрын

    Coudn't we use JSON Patch instead?

  • @maniraj1920
    @maniraj192029 күн бұрын

    Technically sound! Thank you!

  • @letsplay1122
    @letsplay112229 күн бұрын

    Amazing. Thanks you probably saved me a couple hours lmao

  • @yassermian9913
    @yassermian991329 күн бұрын

    Is EF Core going to work with DbContext Factory without any modifications?

  • @sashawild1
    @sashawild1Ай бұрын

    Thank you for the video! What I still could not understand is if there is a way to adopt the clean architecture together with EfCore's IDbContextFactory approach? In my projects I widely use GraphQL and HotChocolate library and for the last one using IDbContextFactory seems to be the preferable way of work with DbContext. So are there any examples of code or at lease ideas described of how to deal with Repositories and UnitOfWork abstraction in a Clean architecture project when IDbContextFactory is involved?

  • @dominikkownacki8235
    @dominikkownacki8235Ай бұрын

    While watching your video, I could add DI to my wpf app and it worked! Great job

  • @alexwerf6084
    @alexwerf6084Ай бұрын

    Magnificent! I`ve spent several hours trying to do it, and so i can!

  • @ijeanpierrebp
    @ijeanpierrebpАй бұрын

    a master class! ❤

  • @vijai851
    @vijai851Ай бұрын

    I was watching 3 or more videos before I hit this one. I didn't understand the pattern using previous videos & this one really helped me to pick up the topic. Thank you!

  • @andreasvanbergen9696
    @andreasvanbergen9696Ай бұрын

    Great video! Thank you for clarifying this topic and telling the true story!

  • @farzadjamshidicom
    @farzadjamshidicomАй бұрын

    Thank you for this video. My question is if we should update basic info from user profile, why we do not update comment text in post aggregate?

  • @anjanigente
    @anjanigenteАй бұрын

    Thanks for info

  • @maksmaryanchuk710
    @maksmaryanchuk710Ай бұрын

    Hi @Codewrinkles ! Great video and explanation! Thanks, but I have a case where I use a service that connects to IHostedService via DI. This worm uses my database, and when I made a memory snapshot, I saw a bunch of MyDbContext objects (because it is of Transtient type). What is the best way to do in this case?