Every Single LINQ Extension Method With Examples | .NET & C# Essentials

  Рет қаралды 34,743

Amichai Mantinband

Amichai Mantinband

Күн бұрын

In today's video we're going to cover every single LINQ extension method with examples.
We're going to cover immediate execution vs deferred execution - what's the difference between them and whether or not immediate execution necessarily means iterating over the entire list and realizing the LINQ query.
Connect with me on 'em socials:
Twitter: / amantinband
LinkedIn: / amantinband
GitHub: github.com/amantinband
Check out all my courses on DomeTrain:
dometrain.com/author/amichai-...
Support the channel and get the source code:
/ amantinband
Thanks for watching, don't forget to like & comment & subscribe! ❤️ 💻
00:00. Opening
01:14. Where
01:40. OfType
02:24. Skip
02:35. Take
02:42. SkipLast & TakeLast
02:58. SkipWhile & TakeWhile
04:14. Select
04:36. Select with index
05:01. SelectMany
06:41. SelectMany with index
07:04. Cast
07:20. Chunk
07:58. Deferred Execution vs Immediate Execution
10:55. Any
11:20. All
11:44. Contains
11:55. Append & Prepend
12:41. Count
13:34. TryGetNonEnumeratedCount
14:51. Max
15:16. MaxBy
17:02. Min & MinBy
17:19. Sum
17:59. Average
18:06. LongCount
18:20. Aggregate (overload 1)
19:58. Aggregate (overload 2)
20:20. Aggregate (overload 3)
21:43. First & FirstOrDefault
22:34. Single & SingleOrDefault
24:06. Last & LastOrDefault
24:38. ElementAt & ElementAtOrDefault
25:04. DefaultIfEmpty
25:41. ToArray
25:50. ToList
25:57. ToDictionary
26:29. ToHashSet
26:35. ToLookup
27:46. ToEnumerable & ToQueryable
28:32. Enumerable.Range
29:28. Enumerable.Repeat
29:38. Enumerable.Empty
30:12. Distinct
30:26. DistinctBy
30:59. Set Operations Theory (Union, Intersect, Except)
32:27. Union
32:37. Intersect
32:44. Except
32:52. UnionBy & IntersectBy & Except
33:40. SequenceEqual
34:26. Zip
35:43. Join
37:05. GroupJoin
37:38. Concat
38:05. GroupBy
39:25. Order
39:41. OrderBy
40:10. OrderDescending & OrderByDescending
40:21. ThenBy & ThenByDescending
41:20. Reverse
41:36. PLINQ

Пікірлер: 78
@amantinband
@amantinband 4 ай бұрын
Cheers 🥂 01:14. Where 01:40. OfType 02:24. Skip 02:35. Take 02:42. SkipLast & TakeLast 02:58. SkipWhile & TakeWhile 04:14. Select 04:36. Select with index 05:01. SelectMany 06:41. SelectMany with index 07:04. Cast 07:20. Chunk 07:58. Deferred Execution vs Immediate Execution 10:55. Any 11:20. All 11:44. Contains 11:55. Append & Prepend 12:41. Count 13:34. TryGetNonEnumeratedCount 14:51. Max 15:16. MaxBy 17:02. Min & MinBy 17:19. Sum 17:59. Average 18:06. LongCount 18:20. Aggregate (overload 1) 19:58. Aggregate (overload 2) 20:20. Aggregate (overload 3) 21:43. First & FirstOrDefault 22:34. Single & SingleOrDefault 24:06. Last & LastOrDefault 24:38. ElementAt & ElementAtOrDefault 25:04. DefaultIfEmpty 25:41. ToArray 25:50. ToList 25:57. ToDictionary 26:29. ToHashSet 26:35. ToLookup 27:46. ToEnumerable & ToQueryable 28:32. Enumerable.Range 29:28. Enumerable.Repeat 29:38. Enumerable.Empty 30:12. Distinct 30:26. DistinctBy 30:59. Set Operations Theory (Union, Intersect, Except) 32:27. Union 32:37. Intersect 32:44. Except 32:52. UnionBy & IntersectBy & Except 33:40. SequenceEqual 34:26. Zip 35:43. Join 37:05. GroupJoin 37:38. Concat 38:05. GroupBy 39:25. Order 39:41. OrderBy 40:10. OrderDescending & OrderByDescending 40:21. ThenBy & ThenByDescending 41:20. Reverse 41:36. PLINQ
@drhdev
@drhdev 4 ай бұрын
Dude this is the best video I have ever watched on this subject. You crushed this. No stumbling, no half-assing, no confusion. You were well prepared and taught everything perfectly. Just wanted to comment to let you know.
@FromRootsToRadicals
@FromRootsToRadicals 11 күн бұрын
Good vid. I have been doing c# among many languages for over 10 years now. Somethings if you never need it you just dont get to learning it yet from being busy so nice people make these vids.
@darrenleeyx
@darrenleeyx 4 ай бұрын
There's no reason why I should not like this video. Amazing effort, thank you Amichai 🙏
@LucasAlves1
@LucasAlves1 4 ай бұрын
Phenomenal and comprehensive guide! Incredibly helpful! Thanks
@PaulPetersVids
@PaulPetersVids 4 ай бұрын
Liked and already subscribed. Am waiting for the PLINQ course! Never heard or used PLINQ but sounds useful. Thanks you!
@_OsamaAmir
@_OsamaAmir 4 ай бұрын
Best LINQ video in my opinion, and the only one you need to understand the topic, I just clicked on a whim, but I am glad that I did, thank you so much for making it.
@SmittyRG
@SmittyRG 3 ай бұрын
Best LINQ video ever. I’ve been using LINQ for a long time and didn’t know half of these methods. 😃👍🏼
@ruichen1003
@ruichen1003 4 ай бұрын
Marvelous, love such style of video that introduces bcl
@Radictor44
@Radictor44 4 ай бұрын
I'm not a developer, but I do write code to test software, and I learnt some very nice things here. Great video!
@imadayoub5237
@imadayoub5237 13 күн бұрын
This is amazing indeed!! I have subscribed immediately.
@MAdeelFaryad
@MAdeelFaryad 3 ай бұрын
thanks for covering all the LINQ methods 🙌🙌🙌🙌 . waiting for PLINQ
@BGivo
@BGivo 4 ай бұрын
This video was perfect, thank you!
@MDimitrovv
@MDimitrovv 3 ай бұрын
This is gold. Thank you for the video :)
@nickbarton3191
@nickbarton3191 4 ай бұрын
Extraordinary !
@nove1398
@nove1398 4 ай бұрын
Learned a bit about the lesser used LINQ extensions.
@youcontaromulo-ye5vs
@youcontaromulo-ye5vs 2 ай бұрын
Thanks, man... no bullshit... just an explanation...
@xrysav11
@xrysav11 3 ай бұрын
Great work. 👏👍
@returnZeroo
@returnZeroo Ай бұрын
Your effort on this 🥰
@mefju08
@mefju08 4 ай бұрын
Great work. Thanks a lot! Consider making a tutorial about all types of lists :)
@amantinband
@amantinband 4 ай бұрын
I should be filming "every single collection type" tomorrow 🤙
@tanglesites
@tanglesites 4 ай бұрын
Awesome! *****
@chyrt
@chyrt 2 ай бұрын
goated!
@BeatusCanis
@BeatusCanis 4 ай бұрын
Amazing video! So much effort; thank you. Once small point, I would cover the overload of Zip that takes a collection and a Func as an argument. That is probably one of the more powerful functions in Linq and strangely very few seem to know about it (it's up there with Aggregate)! One of my favorites is to check if a list is ordered (there are probably simpler ways but this is pretty show-offish) : var isOrdered = !list1.Zip(list1.Skip(1), (a,b) => a.Val
@amantinband
@amantinband 3 ай бұрын
Can’t believe I didn’t know about this until now 🤯
@nihil_._sum
@nihil_._sum Ай бұрын
nice content
@abolfazlshahsavary3437
@abolfazlshahsavary3437 13 күн бұрын
amazing
@xerxesking6734
@xerxesking6734 4 ай бұрын
Awesome
@tunchy
@tunchy 3 ай бұрын
Your explanations are really simple enough and easy to listen and follow. I also have a question, what is the on screen drawing tool you are using?
@amantinband
@amantinband 3 ай бұрын
Presentify
@greekplayback
@greekplayback 3 ай бұрын
תודה 😃😃
@Buutyful
@Buutyful 4 ай бұрын
cool thx
@mryoutuser
@mryoutuser 3 ай бұрын
Thanks for the video, I have a question for Enumarable.Empty when you said the method is static, and every time we will get a reference to same collection. is it because *static* keyword ? Thank you again
@amantinband
@amantinband 3 ай бұрын
Yep
@CodesHunter
@CodesHunter 2 ай бұрын
Amazing video one of the best about LINQ Extension Method but could you please share readme markdown file thank you alot for your effort
@tyomidi
@tyomidi 3 ай бұрын
I'm sure this has been asked many times but what do you use to draw the arrows and boxes on the screencast? Brilliant video btw - I was blinded by the pretty colours 🙂
@Andy01010
@Andy01010 3 ай бұрын
Design patterns videos perhaps?
@daniyalaslam2370
@daniyalaslam2370 4 ай бұрын
Hi, thanks for creating video, i have watched the complete video, also can you please create video on all ef core methods.?
@amantinband
@amantinband 3 ай бұрын
That’s a great idea. Added to my backlog
@daniyalaslam2370
@daniyalaslam2370 3 ай бұрын
@@amantinband Great. Thanks a lot.
@matthewdev
@matthewdev 3 ай бұрын
What are you using to get realtime visualization of the collections?
@meetingattender8132
@meetingattender8132 3 ай бұрын
I love LINQPad
@djupstaten2328
@djupstaten2328 3 ай бұрын
I think I broke my subscribe button this time.
@alexlo5655
@alexlo5655 4 ай бұрын
Great work. Thank you very much to explain here in a concise manner. But there are a lot of courses like this on Pluralsight and Udemy. Anything new here? Do you have the plans to explore/explain Dynamic LINQ and using LINQ in async/await?
@amantinband
@amantinband 4 ай бұрын
I've honestly never taken a LINQ course, so can't compare. Main difference is it's free 🙂 The video in 2 weeks is about PLINQ which from my experience most devs aren't familiar with
@ricodomonkos3053
@ricodomonkos3053 4 ай бұрын
Hi! Amichai! Which tool are you using for drawing boxes and arrows during the presentation? :)
@amantinband
@amantinband 4 ай бұрын
Presentify 🙂
@GigaFro
@GigaFro 4 ай бұрын
Amichai. Please share your terminal set up. Especially the vim bindings in your terminal pls!
@amantinband
@amantinband 4 ай бұрын
My setup is available here: github.com/amantinband/dotfiles
@GigaFro
@GigaFro 4 ай бұрын
@@amantinband Awesome. Thanks for the prompt reply and I love your content btw! (bought your content on dometrain :) )
@theodorosdoukoulos9310
@theodorosdoukoulos9310 3 ай бұрын
@amantinband Where can we find the reactive readme that you have in your video ?
@amantinband
@amantinband 3 ай бұрын
It's available for Patrons (link in description)
@sunefred
@sunefred 3 ай бұрын
Off topic: How did you make ZoomIt draw rainbow-colored squares and arrows?
@XYZ-gr2iu
@XYZ-gr2iu 4 ай бұрын
Hi Amichai, I want to learn C# and ASP to build web application. Which course do you recommend? Do you have of your own, I like the way you explain. From absolute beginner to Mastery as a beginner.
@amantinband
@amantinband 4 ай бұрын
Hey, I don't have such a course yet. If you want to build a system following clean architecture then I'd definitely recommend taking my 2 clean architecture courses. But I wouldn't take them if you're still lacking knowledge in the basics of C#/ASP.NET
@SXsoft99
@SXsoft99 4 ай бұрын
ASP is a framework built on top of the C# language last i checked
@OllyWood688
@OllyWood688 4 ай бұрын
So is the only difference between ToLookup() and GroupBy() having an indexer? Also, given that there's a Zip() method, to effectively Unzip() a ValueTuple[] into a Tuple, is there an ootb LinQ approach, that does not involve multiple enumeration?
@pluto7562
@pluto7562 4 ай бұрын
ToLookup is immediate execution and GroupBy is deferred execution
@OllyWood688
@OllyWood688 4 ай бұрын
Aaaah okay there's the detail I overlooked. Thanks :)
@Deepz007
@Deepz007 3 ай бұрын
Great video, just an observation, at few important places you seem to be running too fast.
@user-nw8oi9vn9y
@user-nw8oi9vn9y 4 ай бұрын
How can I know if a linq method is immediately executed or not - other than looking it up or memorizing it? I hovered my mouse over some linq methods and I didn't see anything that would indicate as such. Thanks.
@amantinband
@amantinband 3 ай бұрын
Documentation mostly. You can use common sense for most methods (like count, contains must be immediately executed etc). Plus all methods prefixed with To (ToArray etc’) will be immediately executed as well
@stevenstone307
@stevenstone307 3 ай бұрын
Holy fuck that thumbnail
@heintaljaard8210
@heintaljaard8210 4 ай бұрын
Typically, these long formats get boring and its easy to stop following. Not the case for this one! Great video, quite a few LINQ methods that you don't typically use. Side note - what do you use to draw on the screen? That is really useful?
@amantinband
@amantinband 4 ай бұрын
Amazing to hear. I use presentify for drawing (it's MacOS only)
@bobweiram6321
@bobweiram6321 28 күн бұрын
Man, too many Ads!
@RiversJ
@RiversJ 2 ай бұрын
Great video, horrible thumbnail to the point it actively repels me.
@rankarat
@rankarat 4 ай бұрын
Audio is terrible
@amantinband
@amantinband 4 ай бұрын
damn, anyone else think so?
@allyssonlp
@allyssonlp 4 ай бұрын
Nope, audio is pretty good
@PaulPetersVids
@PaulPetersVids 4 ай бұрын
audio was fine for me
@Denvercoder
@Denvercoder 3 ай бұрын
Does that dump method work with more complex objects?
@amantinband
@amantinband 3 ай бұрын
Yep. Any object
Dependency Injection Deep Dive | .NET & C# Essentials
38:01
Amichai Mantinband
Рет қаралды 17 М.
Making LINQ Blazing fast with PLINQ (Parallel LINQ) | .NET & C# Essentials
36:26
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 34 МЛН
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 14 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 3,1 МЛН
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
Stop Calling Your API a "REST API"
17:42
Amichai Mantinband
Рет қаралды 14 М.
The Fastest Way to Modify a List in C# | Coding Demo
10:30
Zoran Horvat
Рет қаралды 20 М.
A Simple Kafka and Python Walkthrough
11:34
Quix
Рет қаралды 8 М.
Exceptions are evil. This is what I do instead.
24:41
Amichai Mantinband
Рет қаралды 17 М.
Deep Dive on LINQ with Stephen Toub
1:23:59
dotnet
Рет қаралды 51 М.
Dockerize Your .NET Application in 5 Minutes!
7:42
Amichai Mantinband
Рет қаралды 3,7 М.
5 Rules For DTOs
17:56
Ardalis
Рет қаралды 37 М.
Understand your C# queries! IEnumerable & IQueryable in explained
11:28
tutorialsEU - C#
Рет қаралды 30 М.
Stop returning custom error responses from your API. Do this instead.
12:07
Amichai Mantinband
Рет қаралды 79 М.
Clean Architecture vs Domain-Driven Design (DDD) - Understand the Difference
11:26
Mem VPN - в Apple Store
0:30
AndroHack
Рет қаралды 114 М.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 2 МЛН
wireless switch without wires part 6
0:49
DailyTech
Рет қаралды 4,2 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 18 МЛН
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14