20 Nuget packages that every .NET developer should be familiar with

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ค. 2024
  • Become a Patreon and get source code access: / nickchapsas
    Check out my courses: dometrain.com
    Hello everybody I'm Nick and in this video I will talk about the 20 Nuget which I think that every .NET developer should be familiar with in 2021. These nuget packages can be seen in a wide collection of popular projects and you will definately encounter them during your career as a .NET software engineer.
    The packages:
    0:00 Introduction
    0:57 xUnit & NUnit
    2:14 Moq & NSubstitute
    3:19 Polly
    4:12 FluentAssertions
    5:17 BenchmarkDotNet
    5:53 Serilog
    6:37 Autofixture & Bogus
    7:40 Scrutor
    9:22 Automapper
    10:09 Dapper & Entity Framework Core
    11:32 MediatR & Brighter
    12:37 FluentValidation
    13:17 Refit & RestSharp
    14:08 Json.NET
    Don't forget to comment, like and subscribe :)
    Social Media:
    Follow me on GitHub: bit.ly/ChapsasGitHub
    Follow me on Twitter: bit.ly/ChapsasTwitter
    Connect on LinkedIn: bit.ly/ChapsasLinkedIn
    #nuget #dotnet

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

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

    Nice compilation of a lot of packages you showcased already! Keep it up!

  • @augustinomateso5568
    @augustinomateso5568 3 ปีที่แล้ว +6

    Nice video, really helpful. For .NET Framework I will add ELMAH, HangFire and Autofac

  • @amjster
    @amjster 3 ปีที่แล้ว

    Many thanks Nick, a superb video providing balanced opinion on a lot of very useful packages. Thank you for introducing me to Polly...

  • @leandrowitzke6405
    @leandrowitzke6405 3 ปีที่แล้ว +1

    Love it !! Nice video dude, thanks.

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

    Hi Nick 👍 Thanks for a great content as always 👍👍👍

  • @0blit
    @0blit 3 ปีที่แล้ว +146

    I'd probably add Swagger/Swashbuckle to the list of essentials, but great list otherwise.

    • @carlosjosejimenezbermudez9255
      @carlosjosejimenezbermudez9255 3 ปีที่แล้ว +10

      I'd replace Automapper with that instead, it seems to me it causes more problems than it fixes and few understand it properly when it fails. Turning plain and simple mapping into a difficult to debug mess.

    • @EbrahimAlkadim
      @EbrahimAlkadim 3 ปีที่แล้ว +25

      Since .NET Core 5 (.NET 5) Swagger is now built-in by default .

    • @randyriegel8553
      @randyriegel8553 3 ปีที่แล้ว

      @@EbrahimAlkadim and with .NET 5 you actually create a dependency service using the json file created by swagger.... then just add that reference to your project... It can all the API calls for you from the generated code. So in client you already have methods to call the API.

  • @jarekmag6291
    @jarekmag6291 3 ปีที่แล้ว +38

    My dumb ass reading the title, at first glance thought it's about McDonald's Chicken Nuggets 20 pieces

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

    great video man! thanks a lot!

  • @sergiooliveira4338
    @sergiooliveira4338 3 ปีที่แล้ว +1

    I've used almost one of each kind of nugets you talked about, thats awesome..
    I would like to see a video about MSBuild.. But compiling a project programaticly..

  • @markobottger5706
    @markobottger5706 3 ปีที่แล้ว

    Great video!

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

    Thanks for the list.

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

    Great video. Thanks

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

    Awesome!

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

    I'm really surprised Noda Time hasn't had a mention. A really good package for allowing dates/times to be tested. It also makes you think about what sort of a date/time you have, UTC, a local date/time or one in another Time zone.

  • @sundeliu3324
    @sundeliu3324 3 ปีที่แล้ว

    Thx This is useful.

  • @L0RDeX
    @L0RDeX 3 ปีที่แล้ว +12

    I'd like to add Roslyn code analyzer and styleCop.

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

    Good list. I used most of these in projects. Autofac is a must.

  • @LukeAvedon
    @LukeAvedon 3 ปีที่แล้ว +6

    Wow. That advice about dapper and entity framework is gold!

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

      Yeah, I've done it the opposite way as well... where I would use EF with track changes turn off and used dapper with stored procs for my writes. I am not a big fan of putting business logic in stored procs, but in some cases it just makes sense from a performance standpoint.

  • @chbasitgill1
    @chbasitgill1 3 ปีที่แล้ว +1

    👍👍👍👍👍👍 nice mate.

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

    Swagger Nuget should be added in your list!

    • @samysammour9983
      @samysammour9983 3 ปีที่แล้ว +1

      In .NET 5 it is included by default. :)

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

    I dislike using full ef, however it can be nice to quickly reverse engineer the sql db model into c# using the dotnet ef cli commands, especially when combined with the validation abstraction decorations. It allows you to quickly get the exact models and validation. I would not use those models directly however you can extend those and add whatever alterations you want.

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

    I'd add Respawn by Jimmy Bogard for setting up test data for unit tests but Great list!

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

    I'm happy that I already know most of these

  • @alexandremaciel4520
    @alexandremaciel4520 3 ปีที่แล้ว

    Yeah, you are talking about MSTest. I used it quite a lot with dotnet web APIs on V 4.5

  • @lekabros
    @lekabros 3 ปีที่แล้ว +16

    I see Nick upload, I click like.

  • @damiansuess
    @damiansuess 3 ปีที่แล้ว +1

    Great rundown! it's nice to get a refresher on what is out there.
    Just curious, which program do you use to edit your videos?

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

      I am using DaVinci Resolve

    • @damiansuess
      @damiansuess 3 ปีที่แล้ว

      @@nickchapsas nice, thank you!

  • @AlfredoPinto
    @AlfredoPinto 3 ปีที่แล้ว

    I use dapper and entity framework, please include a review for RepoDB, is an excellent ORM in the middle

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

    Thank you for your hard work, however, I still wished you added atleast one example on how to use it and showcase the use of it.

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

    Hi Nick, please can you do a tutorial on Custom Webhooks.

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

    I wonder why MS won't optimize Json.NET internals directly (without breaking public API) to take advantage of Span Family API and reduce allocations. There might be 2 reason which I can think.
    1. MS don't want to optimize 3rd party libraries (although the author Newtonsoft works at MS)
    2. Or Newtonsoft didn't give the permission to do so!? 😅😅

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +4

      I think that they have said that already. Can't find the blog. Basically that's what they wanted to do originally but as they tried to do so it was so hard to optimize without making any breaking changes that they dropped the idea. It also has to do with how many projects use it. If they were to break something in the process or cause a memory leak or whatever, they would bascically harm every single .net project.

    • @shreyasjejurkar1233
      @shreyasjejurkar1233 3 ปีที่แล้ว

      @@nickchapsas Breaking change that is OK for .NET Core. I mean just get a clone of Json.NET into dotnet runtime (if wanted rename it to System.Text.Json) and optimize its internal for performance! So this way, it will have all features + Perf improvements.

    • @titol6
      @titol6 3 ปีที่แล้ว +1

      @@shreyasjejurkar1233 Sometimes it's better to start project from scratch.

    • @shreyasjejurkar1233
      @shreyasjejurkar1233 3 ปีที่แล้ว

      @@titol6 I don't think so when I look at such a mature library like Json.NET. And also the author of library works at Microsoft, so that shouldn't be the problem from my point of view!

    • @titol6
      @titol6 3 ปีที่แล้ว

      @@shreyasjejurkar1233 Here you have all the explanations @Nick was talking about:
      devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/

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

    Nuget - AspNetCoreRateLimit

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

    BouncyCastle for any Cryptograpic stuff you want to do.

  • @pritishranjan
    @pritishranjan 3 ปีที่แล้ว +4

    Can you please explain a bit How and When to use Dapper and EFCore as you mentioned reads and writes.

    • @Kwod120
      @Kwod120 3 ปีที่แล้ว

      +1

    • @juankar008
      @juankar008 3 ปีที่แล้ว +1

      Dapper is faster for reads than EFCore and for writes they are similar

    • @pritishranjan
      @pritishranjan 3 ปีที่แล้ว +1

      @@juankar008 So for every read should we use Stored procedure always or for Complex reads with joins and stuff...

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

      I left efcore behind with the monoliths and db intensive apps. I’m focused on small micro services and use dapper and never looked back.

  • @mohamedchaabouni3027
    @mohamedchaabouni3027 3 ปีที่แล้ว

    Hello !
    I have a question. I want to execute Javascript (node.js) code on a Web API REST Call (C#). Can I use IJSRuntime ? or it isn't a good practice ? and if so, Is there an alternative to run Javascript code on the back-end side.
    My app have 2 Parts (backend and a front end app) not a Blazor app.

    • @vitaly062
      @vitaly062 3 ปีที่แล้ว

      There is node.js for running JS on the server-side. So you already have .Net app, then you need to run node.js app and all what you need is just think about channel which you will use to trigger node.js functions from your .Net app (it might be HTTP, message queue, whatever)

  • @yourpotatoking
    @yourpotatoking 3 ปีที่แล้ว

    You are not the only big brian in the town. I use arch linux btw.

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

    Very tangentially, I noticed that you are using a Rode NT1-A mic - in addition to software development, I'm also a music producer and think very highly of that model of mic.

  • @AizenSousuke92
    @AizenSousuke92 3 ปีที่แล้ว

    any good model binder for webforms?

  • @benlewies8828
    @benlewies8828 3 ปีที่แล้ว

    Honestly, I haven't heard of either Refit or RestSharp. I have seen NSwag been used a lot (however, I'm not really a big fan).

  • @MilanDendis
    @MilanDendis 3 ปีที่แล้ว +1

    maybe RepoDB as an alternative to Dapper, EF

  • @lamboiah
    @lamboiah 3 ปีที่แล้ว +1

    Very useful info but more for persons already familiar with the packages. Not enough mention of what they actually do, at least for newbies

  • @Sergio_Loureiro
    @Sergio_Loureiro 2 หลายเดือนก่อน

    Can you do a video about whether at this time RestSharp is still relevant compared to the actual encarnation of the native .Net HttpClient? Tks in advance.

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

    I am surprised you missed Autofac and Humanizr.

  • @vredurs
    @vredurs 3 ปีที่แล้ว +1

    What about Noda Time? Or are the date/calendar apis on pair in .net core?

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +1

      I think in 5 years if seen NodaTime once and that one service was doing some time specific things. It’s pretty cool but I wouldn’t put it under a “must know”

    •  2 ปีที่แล้ว

      @@nickchapsas I would recommend NodaTime in every project instead of BCL DateTime because it has a proper abstraction for date, time, time zones, etc. Even if you don't need advanced date time arithmetic you would use proper abstractions.

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

    No love for Flurl instead of maybe Refit? Can't go wrong with fluent coding with stuff like await "api.com".GetAsync()

  • @tomaszkrupa1369
    @tomaszkrupa1369 3 ปีที่แล้ว

    When it comes to creating http clients, try RestEase

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

      It looks like it does the same thing that Refit does. Am I missing something?
      Edit: It actually does mention that it is inspired by Refit

  • @tony-ma
    @tony-ma 3 ปีที่แล้ว

    Hi Nick have you used messtransit package? Will you make a video on it?

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +1

      I know of MassTransit and I will be making a video about it

    • @tony-ma
      @tony-ma 3 ปีที่แล้ว

      @@nickchapsas awesome looking forward to it

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

      Masstransit is very hard to get working and very opinionated, it’s not easy to get going. Brighter I think is a better starter package. I would use nservicebus if my company could afford it.

  • @BittermanAndy
    @BittermanAndy 3 ปีที่แล้ว +6

    JetBrains Annotations is the obvious one missing, first package I add to just about every project I ever make. Log4NET at least worthy of mention next to Serilog too.
    On a separate note, can we please all agree that anything that depends on coding by convention should die in a fire? It's not discoverable, the only way to know it is to know it already, which means it's just more cruft and guff to learn before you can do anything productive. The worst fad in the last two decades.

  • @Eugene.g
    @Eugene.g 3 ปีที่แล้ว

    👍

  • @tumelomotsikelane
    @tumelomotsikelane 3 ปีที่แล้ว

    What about using RepoDB? It is said to be a good combination of EF Core and Dapper 🤔

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +5

      This certainly looks interesting, I wasn't aware of it. That being said it wouldn't make the list even if I did, at least not the 2021 list. A project needs to be mature, stable and widely used before it can make my "top 20 nuget packages list"

    • @tumelomotsikelane
      @tumelomotsikelane 3 ปีที่แล้ว +1

      @@nickchapsas I agree. It really is less mature

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

    Fluent assertions ftw

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

    I’d recommend Castle.Windsor

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

      Too old, I used it in an old app. Autofac is way to go

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

      @@coderider3022 seems very similar to castle Windsor. What is the difference?

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

      @@daa82 you should stick to the latest stuff not the older tech, need to keep your skills up to date and go with industry. Microsoft or autofac is what you see in projects and online. "Good" or "better" unfortunately doesnt apply in software.

  • @lasindunuwanga5292
    @lasindunuwanga5292 3 ปีที่แล้ว

    Well i love EF
    It makes things super easy and save time a lot from making models

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

    I have used a lot of these, but far too many I haven't

  • @nedbog
    @nedbog 3 ปีที่แล้ว +1

    We use fakeiteasy, it is nice

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

      FakeItEasy is the best! :D

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

    3:50 Is anyone actually seeing a link here?

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

    what happend to Fody?

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

    automapper used by junior devs, antipattern for OOP principles.

  • @mwi1536
    @mwi1536 3 ปีที่แล้ว

    For http clients try flurl

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

      I've actually used it in production and I really quickly changed it to Refit. It's cool but i think that Refit is cooler :D

    • @mwi1536
      @mwi1536 3 ปีที่แล้ว

      @@nickchapsas Next time i will give Refit a try

  • @SmileyEmoji42
    @SmileyEmoji42 3 ปีที่แล้ว

    Everywhere I go I find log4net

  • @VJPaz
    @VJPaz 3 ปีที่แล้ว +4

    Why Json.net not newtonsoft.json?

    • @damianrecinski7329
      @damianrecinski7329 3 ปีที่แล้ว

      Isn't that the same?

    • @VJPaz
      @VJPaz 3 ปีที่แล้ว

      @@damianrecinski7329 nope, they are different

    • @damianrecinski7329
      @damianrecinski7329 3 ปีที่แล้ว

      @@VJPaz I don't think so. Even if you go to json.net, you are navigated to newtonsoft.json

  • @wangengzheng8931
    @wangengzheng8931 3 ปีที่แล้ว

    can show list in comment

  • @adriancooke7310
    @adriancooke7310 3 ปีที่แล้ว

    Respawn... Jimmy Bogard

  • @nickfotopoulos5323
    @nickfotopoulos5323 3 ปีที่แล้ว

    READ....READ 🤭

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

    too sad when you only speak in front the camera

  • @SylvanFeanturi
    @SylvanFeanturi 3 ปีที่แล้ว +1

    Interesting list. Most are a safe bet for projects, too, or a good start to look for something that fit the particular use-case better. I don't think Serilog should be on the list, but that's more a personal preference than anything else.
    That said, thumbs down for suggesting using two ORMs at once instead of just learning SQL. That's just lazy.

    • @nickchapsas
      @nickchapsas  3 ปีที่แล้ว +6

      I disagree. It’s not lazy, it’s efficient. Why would I spend time learning something in depth that I really don’t need to? It’s actually been 4 years since I used an RDBMS professionally at all but when I have to Dapper and EF give pretty much the exact same results without me having to be good at SQL. It’s an absolute win

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

      thumbs down for not understanding micro orm. Dapper works on SQL queries. Even in entity framework its possible to use plain SQL queries.

    • @restveggie6155
      @restveggie6155 3 ปีที่แล้ว

      @@rahulj2167 agree. Knowing sql is a must when it comes down to Sql optimisation. Developer needs to know execution plan more or less. Some times orm spits urgly query lowering performance, that’s when raw Sql comes in handy.

    • @rahulj2167
      @rahulj2167 3 ปีที่แล้ว

      @@restveggie6155 Yes. My point was there is no harm in including Dapper, EF under tools for a .Net developer to get familiar with. Each has its use cases.

    • @cascadengineering
      @cascadengineering 3 ปีที่แล้ว +1

      Thumbs down for not knowing that Dapper is not an ORM.

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

    :-) bla bla bla