Asp.Net Core API from scratch w/ clean architecture and CQRS (1) - API versioning, swagger

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 59

  • @bloopers2967
    @bloopers2967 11 месяцев назад +8

    Best tutorials on C# I ever come across, your channel bagged me a job in top 5. It means my home food comes from you. Thank you and never stop doing this♥️

  • @faris.abuali
    @faris.abuali 7 месяцев назад +1

    Thank you very much

  • @fadidib8516
    @fadidib8516 2 года назад +1

    Great Explanation, love the deep dive on different approaches.

  • @ricardopassos1180
    @ricardopassos1180 Год назад +5

    2:13:55 screen gets frozen. Here's what to do:
    *1 - create a file named "IRegistrar" in "CwkSocial.Api.Registrars" namespace with this content:*
    "
    namespace CwkSocial.Api.Registrars
    {
    public interface IRegistrar { }
    }
    ";
    *2 - make "IWebApplicationBuilderRegistrar" and "IWebApplicationRegistrar" implement "IRegitrar";*
    *3 - "RegistrarExtensions" end up like this:*
    "
    using CwkSocial.Api.Registrars;
    namespace CwkSocial.Api.Extensions
    {
    public static class RegistrarExtensions
    {
    public static void RegisterServices(this WebApplicationBuilder builder, Type scanningType)
    {
    var registrars = GetRegistrars(scanningType);
    foreach (var registrar in registrars)
    {
    registrar.RegisterServices(builder);
    }
    }
    public static void RegisterPipelineComponents(this WebApplication app, Type scanningType)
    {
    var registrars = GetRegistrars(scanningType);
    foreach (var registrar in registrars)
    {
    registrar.RegisterPipelineComponents(app);
    }
    }
    private static IEnumerable GetRegistrars(Type scanningType)
    where T : IRegistrar
    {
    return scanningType.Assembly
    .GetTypes()
    .Where(t => t.IsAssignableTo(typeof(T)) && !t.IsAbstract && !t.IsInterface)
    .Select(Activator.CreateInstance)
    .Cast();
    }
    }
    }
    "
    *4 - finally, your "Program.cs" end up like this:*
    "
    using CwkSocial.Api.Extensions;
    namespace CwkSocial
    {
    public class Program
    {
    public static void Main(string[] args)
    {
    var builder = WebApplication.CreateBuilder(args);
    builder.RegisterServices(typeof(Program));
    var app = builder.Build();
    app.RegisterPipelineComponents(typeof(Program));
    app.Run();
    }
    }
    }
    "

  • @rouisaek
    @rouisaek 5 месяцев назад

    Cleaning Program.cs is so helpful

  • @TauwinKul
    @TauwinKul Год назад

    Thank you a lot for this hands on series.

  • @ieremciuccezar6201
    @ieremciuccezar6201 Месяц назад

    This looks promising.

  • @thomasfgooch
    @thomasfgooch 2 года назад +1

    You are a rock star. Thank you so much

  • @avecesar
    @avecesar 2 года назад +1

    Thank you so much for sharing knowledge, opinions and experience. So useful.

  • @hadi1361able
    @hadi1361able 2 года назад

    Very good videos
    About the question in 38:00 about performance isues of guid the answer is yes there are a lot downsides to use guid as id in db, as far as i have researched microsoft does not use random guids instead use sequential guids

  • @FenelHyacinthe
    @FenelHyacinthe 2 года назад +5

    @2:10:00 the video is frozen, what you think it show is not what we see. Thanks for sharing, would like to see the rest of the refactoring. It maybe on the next one since you did not notice it was frozen.

    • @Codewrinkles
      @Codewrinkles  2 года назад

      I have just watched from the mentioned point to the end and everything was fine. The video seems to be ok. The problem may be on your side.

    • @FenelHyacinthe
      @FenelHyacinthe 2 года назад +1

      @@Codewrinkles i would not deminish or put a negative comment on your work cause i learn a lot from it. As i said starting to that time there is nothing show in the IDE, while your voice and movement are still recording. I might not be the only one notice it. May be on your discord all seems fine, but youtube part of it is not.

    • @minjiesun9983
      @minjiesun9983 2 года назад +1

      @@Codewrinkles I had the same issue.

    • @coding-in
      @coding-in 2 года назад

      @@Codewrinklesstart from 2:14 the Visual Studio is frozen while u are talking. I think there are problem with ur switch display recording

    • @zergzerg4844
      @zergzerg4844 2 года назад

      ​@@Codewrinkles The same problem. From 2:10:00 it's visible only your reduced screen the other part of screen is frozen. Could you re-upload video, please.

  • @kylecollie7813
    @kylecollie7813 2 года назад

    Good stuff! Thanks from Virginia USA

  • @dariomostecak4128
    @dariomostecak4128 2 года назад +1

    Very good and educational channel and it has content of real world cases. Thank you and keep up the good work.

    • @Codewrinkles
      @Codewrinkles  2 года назад

      Thank you for your feedback. Highly appreciated!

  • @yashchandel8038
    @yashchandel8038 2 года назад

    Even though I did not watch the live stream, I am still finding it very helpful as questions asked by others at live sessions are very helpful. Keep up the good work and thank you

    • @Codewrinkles
      @Codewrinkles  2 года назад +1

      Thank you very much for your feedback. I'll surely continue this series.

    • @yashchandel8038
      @yashchandel8038 2 года назад

      @@Codewrinkles you just made my day. 😄 And I am eagerly looking forward to it.

  • @user-kx8lm3oi1k
    @user-kx8lm3oi1k 11 месяцев назад

    thanks very much
    for all
    special thanks for simple file

  • @Duelweb
    @Duelweb 2 года назад

    Fantastic series!! Thanks so much!

  • @dimags500
    @dimags500 2 года назад

    Your lessons like gold !

  • @andrewroyal2043
    @andrewroyal2043 2 года назад +1

    great! good job

  • @marawanmalek677
    @marawanmalek677 Год назад +1

    Very good videos

  • @saadatmane9101
    @saadatmane9101 2 года назад

    It's very good!! any topic please let me know.

  • @ahmetozmus9000
    @ahmetozmus9000 2 года назад

    thanks master ♥

  • @rhexcasas8452
    @rhexcasas8452 2 года назад

    thank you.👋👋👋

  • @Ajmal_Yazdani
    @Ajmal_Yazdani 2 года назад

    It's awesome. Thanks for the series. Could you please cover unit and integration test please ? Also how we can perform acceptance test?

    • @Codewrinkles
      @Codewrinkles  2 года назад +5

      Unit testing is definitely something we'll cover. As for acceptance testing, that probably the only part we really can't cover in this project as we don't have "users", a product owner or other stakeholders that could test this for acceptance.

    • @zeusmortegh7538
      @zeusmortegh7538 Год назад

      @@Codewrinkles Did you cover unit testing? thanks for the series

  • @petrbrozek5452
    @petrbrozek5452 2 года назад

    Is better approach to use factory method than the constructor? I mean the situation with one private default constructor and others public.

  • @nawazp
    @nawazp 2 года назад

    Very detailed explanation, thank you.🙂
    I have got a question about incrementing the version when there are breaking changes in the existing APIs. How do we add the next supported version to all the other APIs, which we still want to support?
    For example, while V2 is the latest version, let's say I'm incrementing the version to V3 to introduce a new variant of some API and I've got 100s of APIs in my application that do not have any changes. So what is the best approach now? do I set the new V3 version on all APIs (is there a smart way to do it, instead of setting it explicitly in every controller?) or keep them at V2 only? (Or have I got an incorrect understanding of the API versioning altogether? 😐)

  • @saefulrahman3478
    @saefulrahman3478 2 года назад

    thanks man, 😀,

  • @mohamedal-qadeery6530
    @mohamedal-qadeery6530 2 года назад

    does this course use .net 6 version ? and can i start this course after i finish the asp.net core course for beginners ? and thank you your channel is so good

  • @subratadey3943
    @subratadey3943 2 года назад

    Do you have github repo for this codebase?

  • @zeeshanasghar3751
    @zeeshanasghar3751 Год назад

    what happened to last 10 mins of the stream, seemed like its hanged

    • @Codewrinkles
      @Codewrinkles  Год назад

      I'm aware of that. There was some kind of technical issue. However, since it was live, I don't really have a way to fix it.

  • @mindfresher7579
    @mindfresher7579 2 года назад

    Hi. Your video is frozen at @2:13:45
    , Please fix this last part, Please help me i watched your complete video, Your content is very valuable , lastly please help

    • @Codewrinkles
      @Codewrinkles  2 года назад +1

      It's very unfortunate that the video is frozen and I am aware of the problem. However, there is no way I can fix it :( Sorry for that.

    • @qonxi
      @qonxi 2 года назад +2

      Use the github link in the description. I complete the code with that!

  • @subratadey3943
    @subratadey3943 2 года назад

    Could you please provide my RegistrarExtensions class definitions?

    • @Codewrinkles
      @Codewrinkles  Год назад

      I'm not sure exactly what you mean, but here's a video dedicated only to the concept of registrars: ruclips.net/video/Q2PGTWNmCks/видео.html

  • @dnyaneshwargalave725
    @dnyaneshwargalave725 2 года назад

    Nice and helpful video.. could I know your name ?

  • @arunbm123
    @arunbm123 2 года назад

    nice tutorial, You drink lot of coffee :-)

    • @Codewrinkles
      @Codewrinkles  2 года назад +1

      Don't get fooled by the mug :) It's not coffee :))

  • @muhammednashaf8136
    @muhammednashaf8136 11 месяцев назад

    Thank you very much