Builder Design Pattern (An Introduction for .NET Developers [.NET 5 and C#])

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 22

  • @rajneesh19852
    @rajneesh19852 11 місяців тому +2

    It's a layman explanation. Thanks for sharing

  • @seyhmusozbek
    @seyhmusozbek 2 роки тому +1

    that was the simplest and clearest explanation of the pattern. good job.

  • @pawansarwal9507
    @pawansarwal9507 Рік тому

    How to set address if in case Address is a separate class means address field of User is of type Address. Address class may have fields like StreetNumber, Street, City etc.

  • @MrChuyelChief
    @MrChuyelChief 2 роки тому

    All clear, thanks so much for you excellent explain

  • @shivaganga9148
    @shivaganga9148 11 місяців тому

    Simple explanation thanks

  • @mahendranchinnaiah7593
    @mahendranchinnaiah7593 3 роки тому +1

    Thanks much. It would be helpful If you starts the session for Azure or CI/CD pipeline integration...

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 роки тому

      @Mahendran Chinnaiah, thanks for watching! I will definitely start on Azure in the coming week.

  • @williamliu8985
    @williamliu8985 3 роки тому +1

    Thanks! That`s simple and easy to understand! One more question, can I use the "init accessor" from C#9 instead if I want the immutable properties?

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 роки тому

      @William Liu, I guess you can use init for creating an immutable property. I am not 100% sure how it will work in this scenario, I will have to try it out and see.

  • @zxph
    @zxph Рік тому

    This was a good intro, but I believe creating the user object in the builder constructor was a mistake. Better to create the user object in the build function, that way you don't have to list all the user properties twice in the builder, and you can keep private setters in the user class itself.

  • @kacperk648
    @kacperk648 2 роки тому

    "services.AddSingleton" what it is?

    • @DotNetCoreCentral
      @DotNetCoreCentral  2 роки тому +1

      This is for adding service into dependency injection container

    • @user-ge2vc3rl1n
      @user-ge2vc3rl1n 2 роки тому

      I think this is part of the dotnet web api start up project. Checkout dotnet web apis and checkout singleton pattern.

  • @paulofernandoee
    @paulofernandoee 2 роки тому

    Nice vídeo!

  • @AliRaza-zy1zk
    @AliRaza-zy1zk Рік тому

    Sometimes it look some patterns are over complex with no reason to use

  • @twitchdude55
    @twitchdude55 2 роки тому

    just create a interface for the builder and use register it in the ICO not the class itself, so you can use the class in the client or in the api to get the values or assign them in the api not in the registration