AutoMapper Clone using C# Source Generators

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ค. 2022
  • How to create an automapper using Source Generators in c# dotnet
    Patreon 🤝 / raw_coding
    Courses 📚 learning.raw-coding.dev
    Shop 🛒 shop.raw-coding.dev
    Discord 💬 / discord
    Twitter 📣 / anton_t0shik
    Twitch 🎥 / raw_coding
    Make sure to check out other videos:
    Expression API Clone: • AutoMapper Clone using...
    IL Generator: • AutoMapper Clone using...
    Reflection: • AutoMapper Clone using...
    Roslyn at Runtime: • AutoMapper Clone using...
    Performance: • AutoMapper Clone Perfo...
    Sauce 🥣 github.com/raw-coding-youtube...
    #csharp #dotnet #automapper

ความคิดเห็น • 24

  • @willinton06
    @willinton06 2 ปีที่แล้ว +3

    OfType() is the same as Select(t => t as T).Where(t => t != null)

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว

      Ty for sharing

  • @davideglass
    @davideglass 2 ปีที่แล้ว +8

    By the way, there are multiple attribute lists because you can specify multiple attributes at a time. For example: [Attribute1, Attribute2] is a single attribute list. [Attribute1][Attribute2] would be 2 attribute lists, each with a single attribute :)

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว +1

      Didn’t know that thank you!

    • @ivandrofly
      @ivandrofly 9 หลายเดือนก่อน

      This video explain it well th-cam.com/video/azJm_Y2nbAI/w-d-xo.html

  • @solidsloth1
    @solidsloth1 ปีที่แล้ว

    Funny, I just watched one of your other videos on source generators because I wanted to play around with a source generated mapper, and sure enough this video pops up. Cheers on another very helpful video.

  • @sunnypatel1045
    @sunnypatel1045 2 ปีที่แล้ว +1

    Make this guy MVP!!! love what you done here dude.

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว

      Cheers my dude

  • @mensaco1
    @mensaco1 ปีที่แล้ว +2

    Hey Raw Coding, thanks for sharing your knowledge. Many developers, myself included, learn advanced programming features from you. That knowledge strengthens our position on the job market and ultimately our life standard. You're a good person, god bless you!...

    • @RawCoding
      @RawCoding  ปีที่แล้ว

      thank you for your comment, glad I could help

  • @SuperKombain
    @SuperKombain 2 ปีที่แล้ว +3

    Hi! You can replace enumerable .Select(_ => _ as T).Where(t => t != null) with .OfType

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว +1

      Ah yes thank you

  • @johncerpa3782
    @johncerpa3782 2 ปีที่แล้ว +2

    Thank you for making these videos 👍👍

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว

      Thank you for watching

  • @meJevin
    @meJevin 2 ปีที่แล้ว +1

    Антон как всегда красив, великолепен и умён! Любим целуем

  • @ivandrofly
    @ivandrofly 9 หลายเดือนก่อน

    Thanks :)

  • @alirezanet
    @alirezanet 2 ปีที่แล้ว +1

    Hi anton great video,
    but for debugging source generators I suggest using the "debugger attach" for example in the constructor. It might be a better way to see what is happening in the generator code.

  • @ebrahimmansur9815
    @ebrahimmansur9815 2 ปีที่แล้ว +1

    loving it mate...
    friendly reminder to upgrade all your .NET 5.0 apps ......as it has reached end of life....meaning it is no longer supported... recommend moving to a supported release such as .NET 7.0

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว +1

      thank you for sharing.

  • @yourockst0ne
    @yourockst0ne 2 ปีที่แล้ว +2

    Explorer on the right 👍

    • @RawCoding
      @RawCoding  2 ปีที่แล้ว

      Top tip )

    • @yourockst0ne
      @yourockst0ne 2 ปีที่แล้ว +3

      For the ones who are wondering why the file explorer is on the right side, it's because when you open this panel to see the files, it doesn't push/move the code window. So the code never moves. And your eyes can jump back to the exact same place on the screen when you want to go back on the code after having opened the file explorer on the side.