Saeed Esmaeelinejad
Saeed Esmaeelinejad
  • 41
  • 117 011
🔥 xUnit version 3 is out: they finally healed the pain!
xUnit.v3 has been released recently with lots of cool features, In this video I've covered three of the most interesting of them.
⭐ Check the code [xUnitV3Features]: github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#content-list-order-by-date-desc
xUnit migrations: xunit.net/docs/getting-started/v3/migration
Moments
00:00 - Intro
00:32 - xUnit structure
02:06 - Running tests in sequence or parallel
05:43 - IClassFixture in xUnit
11:23 - ICollectionFixture in xUnit
#dotnet #csharp #unittesting #xunit #xunitv3
-------------------------------------------
👉 Follow me on LinkedIn:
www.linkedin.com/in/sa-es-ir
มุมมอง: 25

วีดีโอ

xUnit Essentials: Test parallelism, Collections and Fixtures!
มุมมอง 1527 ชั่วโมงที่ผ่านมา
xUnit Essentials: Test parallelism, Collections and Fixtures In this video, I walk through the xUnit fundamentals that every developer should know about, you can find the answers to these questions in the video: - How will xUnit pick and run a test? - When will tests be run in sequence or in parallel? - What is a collection? - How/When should I use IClassFixture and ICollectionFixture? ⭐ Repo [...
👉 Implement a Kafka-like message broker with .NET BlockingCollection!
มุมมอง 10K2 หลายเดือนก่อน
In this video, we'll see how easy implementing a Kafka-like message broker is. The purpose is to detach consuming from producing messages. I've implemented three methods: Produce, Consume, and Close. Please let me know your feedback in the comments. ⭐ Check the code [KafkaWithBlockingCollection]: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#content-list-order-by-date-desc Mo...
🐞 EF Core bug: Avoid using Async method with Large data result!
มุมมอง 13K3 หลายเดือนก่อน
There is a bug in the EF Core Async methods! Optimized queries are not enough when we deal with large data and other factors come into the picture like network or EF Core internals. In this video, I've explained a bug in Async methods which is surprising since always using asynchronous is recommended but it seems here is not true yet! ⭐ Check the code [EFCoreLargeData]: github.com/sa-es-ir/yout...
🥶 Managing Concurrency with SemaphoreSlim: Avoid DeadLock!
มุมมอง 7043 หลายเดือนก่อน
In this video, I show you my real experience with fixing a deadlock in a high-load application which was using SemaphoreSlim. I've covered some caveats in using SemaphoreSlim and CancellationToken which can put your application in a deadlock situation. 👉 Checkout the repo [SemaphoreSlimWithCancellationToken]: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#all-youtube-sample-co...
🔥 Don't use Task.WhenAll, it may not be efficient enough!
มุมมอง 7K4 หลายเดือนก่อน
In C#, Task.WhenAll is commonly used to run multiple tasks in parallel, but is it always the best option? In this video, I'll explore scenarios where Task.WhenAll may not be the most efficient choice. I'll also demonstrate how to create a custom method for executing tasks in parallel, avoiding the pitfalls of Task.WhenAll. Check the code[RunMultipleTasks]: github.com/sa-es-ir/youtube-samples/tr...
Integration Test: Mock PartOf a class
มุมมอง 2344 หลายเดือนก่อน
When we're trying to write integration tests, usually it's better not to mock any class or method and execute actual code. By doing so we can make sure all code paths and different scenarios will be covered. But what if you want to mock only one method of a class? Well, there are a few ways to do that, in this video, while I talk about all possible ways the main focus is on NSubstitute and how ...
🍕 Template Method pattern: Refactor and make your application plug-in-able
มุมมอง 6985 หลายเดือนก่อน
Template Method is one of the behavioral patterns which means you can manage the code to behave differently based on our logic. It is used to define a skeleton of an algorithm in a base class and other subset classes can follow the steps or even customize them. In this video, I'm going to refactor a code and use the Template Method pattern. Check the code [TemplateMethod]: github.com/sa-es-ir/y...
🌵 Can Async/Await block the main thread?
มุมมอง 1.6K5 หลายเดือนก่อน
In this video, I show how to use async/await pattern in the correct and prevent the main thread from being blocked. Check the repo: github.com/sa-es-ir/youtube-samples/tree/main?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel #asyncawait #csharp #dotnet #asynchronousprogramming #async Moments 00:00 - Intro 00:15 - async/await diagram 02:16 - The code part of async/await 04:58 - ...
🔐 ASP.NET Core Authorization: Policy Based Access Control
มุมมอง 9486 หลายเดือนก่อน
In this video, I show you how to implement Policy-Based Authorization in ASP.NET Core, I covered both minimal API and Controller-Action. Check the code here: Repo: [PolicyBasedAuthorization] github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel #aspnetcore #dotnet #authorization #policybasedauthorization Moments 00:00 - Intro 00:27 - The code base 0...
🔐 ASP.NET Core Authorization: Role-Based Access Control (RBAC)
มุมมอง 1.6K7 หลายเดือนก่อน
In this video, I show you how to implement Authorization using Role-Based Access Control (RBAC), I covered both minimal API and Controller-Action. Check the code here: Repo: [RoleBasedAuthorization] github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel Moments 00:00 - Intro 00:47 - The code base 02:35 - Call the API 03:05 - Generate JWT token using ...
🌶️ How to use Kafka in .NET 8?
มุมมอง 8K7 หลายเดือนก่อน
Do you want to know how we can use Kafka in .NET? Then here you go! In this video, I've tried to simplify concepts about Kafka and also write a semi-real-world application that you may face in your daily projects. repo[KafkaDotNet]: github.com/sa-es-ir/youtube-samples?tab=readme-ov-file#all-youtube-sample-codes-i-use-in-my-channel I think event-steaming is a really nice area to investigate and ...
🚀 EF Core 8: How to optimize a query?
มุมมอง 3.5K7 หลายเดือนก่อน
Do you want to make your queries more performant and efficient? Then this is the way you go! I've tried to address most cases in a Real-world query that you may face in your projects and fix them. If you saw my previous videos, I always like to explain the current situation and how to make it better, and finally code, I believe you grasp the concept better. Hope you enjoy it! Repo[EFQueryOptimi...
Writing your own MediatR from scratch in C#
มุมมอง 1.1K8 หลายเดือนก่อน
I think most .NET developers already use or at least know about the MediatR Nuget package. It's an in-process messaging with no dependencies and supports request/response, commands, and notifications. Really cool Nuget library. But have you thought about how MediatR works? As I'm curious to know how things work, here I try to show the gist of MediatR and how to write your own one from scratch i...
Multi-Tenant applications: How to do it in the correct way!
มุมมอง 2.8K9 หลายเดือนก่อน
Multi-tenancy allows multiple users to share resources while keeping their data separate. In a multi-tenant application, customization is provided for each user group (tenants), while the core functionality remains the same. How we should handle this situation? well, it's easy! Just need to know, the current request is for which tenant, done! In this video, I've tried to address two issues that...
.NET: Console Application + Gaming!
มุมมอง 3149 หลายเดือนก่อน
.NET: Console Application Gaming!
💥 gRPC on .NET: How to use gRPC in ASP.NET Core Api
มุมมอง 6K10 หลายเดือนก่อน
💥 gRPC on .NET: How to use gRPC in ASP.NET Core Api
🚀 ASP.NET Core: Faster Api with Multi-Layer cache!
มุมมอง 1.4K10 หลายเดือนก่อน
🚀 ASP.NET Core: Faster Api with Multi-Layer cache!
.NET Aspire: How to use Redis step by step
มุมมอง 89710 หลายเดือนก่อน
.NET Aspire: How to use Redis step by step
🌶️ .NET: What is wrong with the HttpClient object?
มุมมอง 2.4K11 หลายเดือนก่อน
🌶️ .NET: What is wrong with the HttpClient object?
SQL Server Indexing: How database engine chooses an index for a query?
มุมมอง 57011 หลายเดือนก่อน
SQL Server Indexing: How database engine chooses an index for a query?
.NET Aspire: How to use RabbitMQ component step by step?
มุมมอง 2.7Kปีที่แล้ว
.NET Aspire: How to use RabbitMQ component step by step?
🔐 ASP.NET Core Authentication: JWT token validation using OpenID Connect (OIDC)
มุมมอง 9Kปีที่แล้ว
🔐 ASP.NET Core Authentication: JWT token validation using OpenID Connect (OIDC)
🆒️ .NET Aspire: How it works behind the scenes?
มุมมอง 4.3Kปีที่แล้ว
🆒️ .NET Aspire: How it works behind the scenes?
What is the difference between BackgroundService and HostedService?
มุมมอง 4.4Kปีที่แล้ว
What is the difference between BackgroundService and HostedService?
🔆 C# Serializers: NewtonSoft vs Protobuf vs Apache.Avro vs MessagePack vs Bson
มุมมอง 2.2Kปีที่แล้ว
🔆 C# Serializers: NewtonSoft vs Protobuf vs Apache.Avro vs MessagePack vs Bson
EF Core: Be careful about Find method cache!
มุมมอง 397ปีที่แล้ว
EF Core: Be careful about Find method cache!
❌️ ASP.NET Dependency Injection: You may be wrong about Scoped services!
มุมมอง 3.2Kปีที่แล้ว
❌️ ASP.NET Dependency Injection: You may be wrong about Scoped services!
♾️ ASP.NET Dependency Injection: Handle multiple implementations for one interface with delegate
มุมมอง 4.3Kปีที่แล้ว
♾️ ASP.NET Dependency Injection: Handle multiple implementations for one interface with delegate
👨‍💻 C# xUnit: How to run code before and after a test!
มุมมอง 954ปีที่แล้ว
👨‍💻 C# xUnit: How to run code before and after a test!

ความคิดเห็น

  • @حسینمحسنی-ب7ق
    @حسینمحسنی-ب7ق 2 วันที่ผ่านมา

    موفق باشی بسیار عالی

    • @sa-es-ir
      @sa-es-ir 2 วันที่ผ่านมา

      ممنون باباجان❤️

  • @kowalskijr.
    @kowalskijr. 8 วันที่ผ่านมา

    Thanks man, helped a LOT. Happy Holidays

    • @sa-es-ir
      @sa-es-ir 2 วันที่ผ่านมา

      Glad it was helpful, enjoy holidays:)

  • @ArjunRR-cz8hb
    @ArjunRR-cz8hb 11 วันที่ผ่านมา

    Hi , I have requirement using Cosmos Db.All tenants share same dbnsme and connection string Which is better to have 1.Single Dbcontext Change the container name on dynamic based on tenant provider 2. Spreate Dbcontex for each tenant..

    • @sa-es-ir
      @sa-es-ir 8 วันที่ผ่านมา

      I'll go for the first approach, the important thing here having a single connection to cosmosdb, it is exactly like calling a third-party API, you'll create a HttpClient with a base address (here is the connecitonString) and call different endpoints (here is the containername).

    • @ArjunRR-cz8hb
      @ArjunRR-cz8hb 7 วันที่ผ่านมา

      @sa-es-ir Thank you for the details.. But I have one query, I have created a project with 1st approach 1., In a single AppDbcontext Onmodelcreating calling only once 2. When I send a request for another tenant Onmodelcreating is not getting called.. 3.Using AddDbContextFactory in Di container Please let me know to resolve this

    • @sa-es-ir
      @sa-es-ir 7 วันที่ผ่านมา

      @@ArjunRR-cz8hb Do you have a code like mine in this video? if yes then please provide a github repo then I can see the code and talking about the actual problem.

  • @AbdulHannan-w5k
    @AbdulHannan-w5k หลายเดือนก่อน

    Nice topic

    • @sa-es-ir
      @sa-es-ir หลายเดือนก่อน

      Glad you like.

  • @this.developer
    @this.developer หลายเดือนก่อน

    Well explained. Thanks.

    • @sa-es-ir
      @sa-es-ir หลายเดือนก่อน

      Glad it was helpful!

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

    Awesome explanation, great job!

    • @sa-es-ir
      @sa-es-ir หลายเดือนก่อน

      Glad it was helpful!

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

    great way to explain! Thanks, one question in my mind - After updating database to the last sate and removing migration, you still have that Description property, so we have to remove our code level changes manually, right?

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      Yes, correct. Basically we need to do two steps: 1- cleanup migrations and database (this video) 2- remove the properties that already cleaned up in previois step from the code

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

    Hi dear fellow, how yo doing?! I hope pretty good ❤ well first of all thanks a bunch for your teaching here.

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      I'm pretty good, thanks:) Glad you like the video

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

    بعضی از تلفظات خیلی فارسیه،حیفه متد، ریسپانس و ... که بیشتر تو محیط های آیتی انقدر اشباه تلفظ میشه که تلفظ اشتباهش فسیل شده.

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      ممنون از اینکه با دقت ویدیو رو تماشا میکنی! هر کشوری لهجه خودشو داره اگر تو محیط انیترنشنال کار کرده باشی به راحتی متوجه لهجه انگلیسی حرف زدن هندی ها، فرانسوی ها(وحشتناک)، روسی ها و.... کاملا طبیعی هست!

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

      @@sa-es-ir منظورم لهجه نیست ،تلفظه.

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

    It's weird that still open

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      They mentioned in the ticket that it will take years to fix!!

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

    Why not use Channel?

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      While using Channels is ok for doing the same purpose, I find it more complicated to work with. Basically, I always like the visibility in the code, no magic behind the scene happening.

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

    ❤❤ nice

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      Thanks! I'm glad you liked it.

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

    Great topic as always, explaining complex topics in the most simplest way ❤️ I think we can also enumerate the Blocking collection in the Consume method and yield the Item back since Blocking Collection waits for new items and in close method we give the "Complete" to the blocking collection

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      Glad you like the video and awesome suggestion about using yield, I didn't think about this option, thank you for the input.

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

    اولین کامنت 😅 سامانه استعلام یکپارچه

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      محسن این سامانه استعلام یکپارچه دیگه بخشی از خاطرات ماندگار منو تو شده:)))

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

    Excellent! It helped me a lot!!

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      Glad you enjoyed:)

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

    Very well explained. Simplicity at at its best.

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      Happy you like the video

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

    Thank you very much for your videos.

    • @sa-es-ir
      @sa-es-ir 2 หลายเดือนก่อน

      You are very welcome

  • @pieceofcode_
    @pieceofcode_ 3 หลายเดือนก่อน

    Hello @Saeed, at 16:32 you said, if we make changes in proto file and if API is referring it directly, then it will break API. So, it will not impact if sdk referring to same proto file (if proto file changes and bulid)?

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Well in the video I created a decorator on top of the `Generated` grpc service in the SDK, so basically API depends on the SDK (the decorator service), what we want is not depend on any generated grpc classes from the caller side (the API). If there are some changes on the GRPC server and there is some direct dependencies to it then all those clients will be failed but if inside the sdk decorator we handle all the exceptions then we are safe from breaking those callers, at least until we change the SDK!

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

      @@sa-es-ir sounds good. I got your point. :) thank you

  • @aming2446
    @aming2446 3 หลายเดือนก่อน

    Thank you so much! What about synchronization between application instances. Do you have any solution for this?

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      The best way is using a message queue, so one instance will send a message and the other side there is a consumer listening on same queue to process and sync the state.

  • @OPauloChagas
    @OPauloChagas 3 หลายเดือนก่อน

    Muito bom conteúdo.

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Thank you:)

  • @balagurunathanmarimuthu2807
    @balagurunathanmarimuthu2807 3 หลายเดือนก่อน

    Great work Saseed! You are explaining the exact scenario what we faced. As you mentioned We never aware of this problem. You taught me not only how to use nvarchar with EF, we should always keep an eye on the all bugs and discussion in the repo. Thanks again and keep doing the great work. 👍

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Very happy it was helpful to you, please support me by sharing my videos to your network, would be appreciated 🙏

    • @balagurunathanmarimuthu2807
      @balagurunathanmarimuthu2807 3 หลายเดือนก่อน

      @@sa-es-ir I already shared to my network. 👍

  • @mahdiyar6725
    @mahdiyar6725 3 หลายเดือนก่อน

    nice tip for ef core but don't use database for storing big file , SQL server design for fast and small request/response . file stream is good option for storing that as binary , also there is azurite (Azure Storage API) for free write on node.js . you can use that as well . tip: as much as you can don'tuse max on varchar or nvarchar .always have limit . nice work keep going.

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      @@mahdiyar6725 Thanks for the great sum up and totally agree.

  • @SamH-h1v
    @SamH-h1v 3 หลายเดือนก่อน

    Great work Saeed, keep continue 🙂

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      @@SamH-h1v Thanks and happy you like it

  • @cvetomiranedelcheva9946
    @cvetomiranedelcheva9946 3 หลายเดือนก่อน

    This video was very helpful, but is there any chance you know why I get the error " Connect to ipv4#127.0.0.1:9092 failed: Unknown error (after 2032ms in state CONNECT)" with both the producer and consumer? Thanks!

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Thank you and happy it was helpful. About the error, please follow the code in my repo the link is in the description, better to use localhost:9092 and make sure both Kafka and zookeeper are using same network.

    • @cvetomiranedelcheva9946
      @cvetomiranedelcheva9946 3 หลายเดือนก่อน

      @@sa-es-ir But that's what I'm doing. Is it possible that my error comes from not using docker?

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      @@cvetomiranedelcheva9946 Are you run kafka and zookeeper both? they have access to call each other? I think better to run in docker to make sure the problem is not in your code

    • @cvetomiranedelcheva9946
      @cvetomiranedelcheva9946 3 หลายเดือนก่อน

      @@sa-es-ir Okay, thank you very much!!

  • @coding-in
    @coding-in 3 หลายเดือนก่อน

    Greate! thanks Saeed. how if we have many DoNothing(). are we should put Yield as many method as we called? the second, how process long running sub method as background proses?

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Glad you like the video, you can use Task.Yield as many as you can, no issue with that but better to use it when needed to avoid extra overhead for runtime. I didn't get the second question, can you explain more.

  • @philskay8724
    @philskay8724 3 หลายเดือนก่อน

    Thank you, very useful tips you have shared here ❤

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Glad it was helpful!

  • @researcher_m
    @researcher_m 3 หลายเดือนก่อน

    Thank you for your useful tips

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Happy you like it

  • @keithjairam8452
    @keithjairam8452 3 หลายเดือนก่อน

    Great content

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Glad you like it 🙏

  • @coding-in
    @coding-in 3 หลายเดือนก่อน

    Hi Saeed, could you creating video about keycloak?

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      I didn't use it in a production project, I'll check it.

  • @coding-in
    @coding-in 3 หลายเดือนก่อน

    Hi saeed, thanks for great explanation with short duration. I want to ask, how if the consumer fails saving data because maybe there's any field required(consumer side) but the not provided by producer.

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Good question, the Consumer needs to tell kafka to commit the message, either auto-commit by kafka lib or manually commit by developer, the point is you need to handle the validation on consumer so if there is a invalid message you just skip that message and commit it without processing.

  • @bjornandersson8032
    @bjornandersson8032 3 หลายเดือนก่อน

    Try Apache.Avro without the ReflectReader/Writer. That one is significantly slower than the SpecificReader/Writer since it uses a ton of reflection.

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Nice point and thanks for that, I'll check it later.

  • @Blended-familyy
    @Blended-familyy 3 หลายเดือนก่อน

    Beautifully described bro. Loved the explanation 😇

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Glad you like it, thanks

  • @abdalrahmanal-yaqoub4974
    @abdalrahmanal-yaqoub4974 3 หลายเดือนก่อน

    thank you saeed 👌🏻

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Thank you

  • @teraformerr
    @teraformerr 3 หลายเดือนก่อน

    this channel is pure gold

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Much appreciate the support, please help me by sharing my video with your friends.

  • @nutchachanwuttikhun8812
    @nutchachanwuttikhun8812 3 หลายเดือนก่อน

    Woww❤ about to implement this in my project. This provides a good aspect that I’ve never thought of. Thank you Saeed 😊

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      I appreciate Jan, please help me by sharing my video with your friends.

  • @shojaedin
    @shojaedin 3 หลายเดือนก่อน

    Thank you Saeed I enjoyed your explanation

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Glad you enjoy it.

  • @10Totti
    @10Totti 3 หลายเดือนก่อน

    Good tutorial!

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Thank you

  • @DaniLearnsIT
    @DaniLearnsIT 4 หลายเดือนก่อน

    I think a video on MessagePack would be awesome 👀I don't think anyone has made one for that library yet!

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      Thanks for the suggestion, I'll put it in the list

  • @johnnyvlee
    @johnnyvlee 4 หลายเดือนก่อน

    using Select to query a subset of columns is what I'd love to do, but my query is quite complex with a number of layers of Include/ThenInclude. When I try to use this technique just on the top level table I get runtime errors with the data in joined tables. For example, the model generated database-first has both a Foreignkeyid property and Childentity property. If I select the Foreignkeyid field, it does not know how to bring in the Childentity model. In your example you have a Dto record which I presume is a more flattened representation of the Employee model. You reference a child entity property x.User.UserName. In my case I want the x.User. And probably some child entity of x.User as well. I haven't seen great examples of optimizing columns selected by EF queries (or in my case EF Core). There are only really simple cases being demoed.

    • @sa-es-ir
      @sa-es-ir 3 หลายเดือนก่อน

      You got the main idea about having required columns only, if you have time to create a simple repo about what you need then we can fix it together, I'd would say it is easy to tell EF core to generate what we want.

    • @johnnyvlee
      @johnnyvlee 3 หลายเดือนก่อน

      @@sa-es-ir Thanks for the reply. I was able to work out the syntax to get what I want in the long run. However, I am now realizing that if you try to include more than one child MANY relationship, performance tanks noticeably. I am aware of the Split() function, but I've come to the conclusion it's just better for me to run multiple queries rather than one or two big complex queries.

  • @VioletClaw816
    @VioletClaw816 4 หลายเดือนก่อน

    I might missed something here. How did you get the token in the first place before you call the getweather?

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      I generated the token from auth0.com for my user, basically, I didn't want to cover token generation in this video and I've tried to show how to `validate` that token, no matter where it comes from.

  • @rafazieba9982
    @rafazieba9982 4 หลายเดือนก่อน

    Change the order of tasks in the final list to "new List<Task> { taskThree, taskTwo, taskOne }" to see why it doesn't work the way you want it to. It will wait for three seconds before it cancels the "CancelationToken".

    • @igormelnikov5166
      @igormelnikov5166 4 หลายเดือนก่อน

      Yes, it can be improving by dequeueing waiting each task via WaitAny mutiple times, but it can increase memory and CPU allocation.

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      In the worst case, it just behaves like Task.WhenAll()!

    • @igormelnikov5166
      @igormelnikov5166 4 หลายเดือนก่อน

      @@sa-es-ir U didnt get what he want to say, it is not about worst case, it is about reordering await affects execution time in you approach, if last task will wait 1 sec before exeption, you still will wait 3 sec because of first task 3 sec delay

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      @@igormelnikov5166 Yes your scenario is perfectly fine and can happen because there is no way to know task priorities, my point is, even in worst case (taking 3 sec) is the same Task.WhenAll which always takes 3 sec. Am I correct?

    • @igormelnikov5166
      @igormelnikov5166 4 หลายเดือนก่อน

      @@sa-es-ir There is a way to respect task priorities, read my first comment. Worst cases are same in all soulutions ofcourse. But in average solutions have different time

  • @nitishkumar-dt2tx
    @nitishkumar-dt2tx 4 หลายเดือนก่อน

    Awesome explanation

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @sergeantskeleton7392
    @sergeantskeleton7392 4 หลายเดือนก่อน

    Great!

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @nztzn
    @nztzn 4 หลายเดือนก่อน

    Thank you for the content ❤

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Glad you like it, I would appreciate it if you share this video on your network🙏

  • @MikyLestat
    @MikyLestat 4 หลายเดือนก่อน

    There is a new Task.`WhenEach` static method in .NET 9

  • @sanjivranjan5782
    @sanjivranjan5782 4 หลายเดือนก่อน

    Please make a separate video on execution plan in detail. Thanks in advance

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Noted with thanks, stay tunned.

  • @حسینمحسنی-ب7ق
    @حسینمحسنی-ب7ق 4 หลายเดือนก่อน

    ❤❤❤❤❤❤❤❤❤❤❤

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Thank you baba♥

  • @dr.angerous
    @dr.angerous 4 หลายเดือนก่อน

    could be explained under 5minutes. Stupid m o ha mmads content, fkin cancer

  • @Happyprogrammer-p6z
    @Happyprogrammer-p6z 4 หลายเดือนก่อน

    Perfect

    • @sa-es-ir
      @sa-es-ir 4 หลายเดือนก่อน

      Thank you