![Spyros Katsios](/img/default-banner.jpg)
- 55
- 37 781
Spyros Katsios
Приєднався 7 жов 2022
Hi, my name is Spyros Katsios and I'm a C# Software Engineer.
TimeSpan Explained
Hi there! Probably you are already familiar with TimeSpans in .net, but in this short video we take a closer look at them.
Переглядів: 42
Відео
How to Mock Identity in Integration Tests
Переглядів 94Місяць тому
Hi there! A common problem when it comes to integration tests is how to bypass identity. There are a few alternatives, some work, others not. Today we are going to see how to mock Identity, so that it will no longer be a problem!
MediatR in depth (Part 4: Streaming)
Переглядів 65Місяць тому
Hi there! In this new video series, we will explore all of MediatR features. In this video we will see MediatR's streaming capabilities. Full Playlist: ua-cam.com/play/PLtgaC3-iBpdjckV1yLezLNeJwRpOnY5XT.html Introduction to IAsyncEnumerable: ua-cam.com/video/fYwewOtFzA0/v-deo.html #csharp #dotnet #mediator
MediatR in depth (Part 3: Notifications)
Переглядів 1022 місяці тому
Hi there! In this new video series, we will explore all of MediatR features. In this video we will see MediatR's Notifications. Full Playlist: ua-cam.com/play/PLtgaC3-iBpdjckV1yLezLNeJwRpOnY5XT.html #csharp #dotnet #mediator
MediatR in depth (Part 2: Behaviors)
Переглядів 983 місяці тому
Hi there! In this new video series, we will explore all of MediatR features. In this video we will see MediatR's Behaviors. What are Middlewares and why their order matters: ua-cam.com/video/QiKHHFCF0xk/v-deo.html Full Playlist: ua-cam.com/play/PLtgaC3-iBpdjckV1yLezLNeJwRpOnY5XT.html #csharp #dotnet #mediator
MediatR in depth (Part 1: Mediator)
Переглядів 1633 місяці тому
Hi there! In this new video series, we will explore all of MediatR features. In this video we will see MediatR as a mediator implementation. Full Playlist: ua-cam.com/play/PLtgaC3-iBpdjckV1yLezLNeJwRpOnY5XT.html #csharp #dotnet #mediator
How to combine Redis with MediatR
Переглядів 2275 місяців тому
Hi there! Today we are going to see how we can combine Redis with MediatR' s pipelines, so we can implement caching in every request that we want effortlessly. Introduction to Redis: ua-cam.com/video/N8kdnMFjliI/v-deo.html Chapters: 00:00 : Intro 01:23 : CacheAttribute 02:41 : CacheService 06:24 : CacheBehavior 14:05 : Debugging #csharp #dotnet #redis #mediator
Introduction to Redis
Переглядів 1155 місяців тому
Hi there! Today we are going to see what a distributed cache is, why to use it and how to do that using Redis Cache. Chapters: 00:00 : Intro 01:22 : What is a distributed cache 05:26 : Redis implementation #csharp #dotnet #redis
The OwningComponentBase Class of Blazor Server
Переглядів 1296 місяців тому
Hi there! Today we are going to see the OwningComponentBase Class of Blazor Server, which can allow us to have better control of the lifetime of our services. Blazor Server Service Lifetimes: ua-cam.com/video/XEtogSjm_z4/v-deo.html How to use Entity Framework with Blazor Server: ua-cam.com/video/aA3N1mv0R7c/v-deo.html #csharp #dotnet #blazor
Introduction to Value Objects
Переглядів 5026 місяців тому
Hi there! Today we are going to see what Value Objects are and how to create them! Configure value objects with Entity Framework as owned entity types: ua-cam.com/video/cDKBwDnvH6w/v-deo.html #csharp #dotnet #valueobjects
Introduction to IAsyncEnumerable
Переглядів 2157 місяців тому
Hi there! Today we are going to see what IAsyncEnumerable is, how and when to use it. #csharp #dotnet
How to Implement the Result Pattern with the ErrorOr Library
Переглядів 1,5 тис.8 місяців тому
Hi there! Today we are going to see how to implement the result pattern with the library One Of How to Implement the Result Pattern with a very nice library called the ErrorOr. Amichai's channel: www.youtube.com/@amantinband ErrorOr github page: github.com/amantinband/error-or #csharp #dotnet
How to create a Mediator from scratch (Part 2)
Переглядів 1488 місяців тому
Hi there! This is the second part of creating our custom mediator library from scratch. Code available here: github.com/spyroskatsios/UA-cam-Mediator #csharp #dotnet #asp #mediator
How to create a Mediator from scratch (Part 1)
Переглядів 2449 місяців тому
Hi there! This is the first part of creating our custom mediator library from scratch. Code available here: github.com/spyroskatsios/UA-cam-Mediator #csharp #dotnet #asp #mediator
What Eventual Consistency means
Переглядів 989 місяців тому
Hi there! Today we will talk about Eventual Consistency. I will try to explain with simple words and a simple code example. #csharp #dotnet #asp
How to use Output Cache with Authentication
Переглядів 75010 місяців тому
How to use Output Cache with Authentication
Automating Service Registration with Reflection
Переглядів 34111 місяців тому
Automating Service Registration with Reflection
Dependency Injection with Scrutor: Scanning and Registering
Переглядів 97011 місяців тому
Dependency Injection with Scrutor: Scanning and Registering
Why sometimes async and await are bad for your app
Переглядів 210Рік тому
Why sometimes async and await are bad for your app
Should you use Result as your return type?
Переглядів 302Рік тому
Should you use Result as your return type?
Add vs AddAsync - Which one should you use?
Переглядів 494Рік тому
Add vs AddAsync - Which one should you use?
How to create Custom Validation Attributes
Переглядів 252Рік тому
How to create Custom Validation Attributes
How to create a request pipeline from scratch
Переглядів 594Рік тому
How to create a request pipeline from scratch
Client-Side JWT and Refresh Token Handling
Переглядів 1,6 тис.Рік тому
Client-Side JWT and Refresh Token Handling
Has vs Owns in Entity Framework: Which one should you use?
Переглядів 933Рік тому
Has vs Owns in Entity Framework: Which one should you use?
Professional Search with C# and Elasticsearch (Part 3)
Переглядів 380Рік тому
Professional Search with C# and Elasticsearch (Part 3)
Professional Search with C# and Elasticsearch (Part 2)
Переглядів 251Рік тому
Professional Search with C# and Elasticsearch (Part 2)
How the new version of MediatR (12.0.1) might break your application
Переглядів 1,2 тис.Рік тому
How the new version of MediatR (12.0.1) might break your application
Thanks, man. Great stuff!
Thank you very much! :)
Thank you! Straight to the point and informative.
Thank you! 😊
Thanks man
You're welcome! 😊
If anyone come across this attempting to use authenticated user output cache strategy you might be interested in CacheVaryByRules.VaryByValues dictionary that may be added-to/manipulated during IOutputCachePolicy.CacheRequestAsync
Great , What do you think about making a coruse about real project using all these concepts ? I would totally buy it your content is the best
Thank you so much for your kind words! Unfortunately, my audience is at the time very small, so i can't dedicate the time for a full course. Having said that, I'm preparing a project with concepts (among some of those I talk on my videos) like DDD, microservices, token auth (including refresh tokens) and others! Althought I can't go step by step on videos, I'll let you all know when I upload it on github (hopefully before autumn) and probably I'll make an overview video about it.
that's simple and clean thank you
You're very welcome!
can i keep rules in database ?
Hi! I suppose you could, but in what form are you going to store them?
@@spyroskatsios now i try to study Drools. but dont know how to install and integrate with eclipse (java). so i not sure c# also have rule engine that can keep rules in configuration file, xml or database or not?
Hi, what language you are speaking?
Some high quality stuff here, thanks!
Thanks! Glad you liked it!
so don't use the Unit.Value return type at all now?
You can still use it, but since it's a 'contract' for not returning anything, this update removes unnecessary code!
@@spyroskatsios OK cool thanks
Very hard to see the code, please consider to increase the font size for further videos
Newer videos have bigger font size!
Keep it up 🚀❤
Thanks 😊
Thanks a million. Exactly what I was looking for with no fluff and straight to the point. Following the channel for sure!
Thanks a lot man!!!
It's a great video. One of its kind on this subject matter
Thank you very much! 😊
oh shiet, accidentally find vid in your channel, althogth have few sub, but very high quanlity, +1 sub bro 🤝
Really appreciate it man!
Cache invalidation?
If you are talking about manually invalidating it, didn't fit in the logic of that video!
@@spyroskatsios yeah that’s the one. Cool, looking forward to your next video :)
Very interesting topic. Thanks for making it.
Thank you for your consistent kind words! 😊
Very nice video, any chance you could add repo ?
Of course! github.com/spyroskatsios/UA-cam-SearchFilters
@@spyroskatsios you are a super star :)
Good solution, however, I feel that the DiscountRule enum will break the open-closed principle because you will need to modify the enum every time you add a Rule. I would still vote for the order, even if you can assign IDs with gaps, such as ID=100, ID=200. This could give you the freedom to add up to 99 possible rules in between. However, that option isn't perfect either, as it would force you to anticipate what other rules might be added. Nonetheless, it's a good topic and solution. Thanks.
I like your solution! Thanks for your kind words!
thanks for the ErrorOr tutorial
You are very welcome!
Nice video, thanks! Try to make the IDE fonts a bit bigger, code was blurry! Just a point, as I know, domain events must be handled in the same transactional scope, and rollback if fails! By the way, the event you are publishing looks more like a integration event than a domain event!
You are right! You want to have a mechanism of handling domain events fails. Wrap in a transaction the process of handling them, if you want the changes to be immediate, wrap in a transaction the process of saving them if you use the outbox pattern with eventual consistency, etc. I wanted to keep it simple and focus only in the publishing with Mediatr side of things!
nice video.
Thank you!
oh nice thank you !
You're welcome! :)
Simple as it gets! Thanks for this video! Waiting for the next episode!
Thank you very much!
I want to copy the code. Do you have github link for this ?
I uploaded it: github.com/spyroskatsios/UA-cam-RulesEngineDemo
thanks @@spyroskatsios
Good video.
Thanks a lot!
The feeling that mechanical keyboards can create a new language when you start typing on them 😅 Nice video
If I don't hear that clicky sound, I don't feel like I'm coding 😂 Thank you!
Why we added Hero and cilvilan dbset too in dbcontext ?
Because we want to treat them as different entities in the app. The point is that we can have different ones, but still save them on the same table, if we choose to.
Great video .. lets say i want to another class name Manager and the manager has a list<Person> employees for example .. how i can do that ? and how i can configuare it ?
You mean without Discriminators? Like two entities that one has a list of the others?
@@spyroskatsios no with Discriminators the same like you how u created Hero that extends person . i want to make manager that extends Person and contains a list<Person> employees for example
@@mohamedal-qadeery6530 doesn't it work with the default way, by adding the List to the Manager?
@spyroskatsios No it didn't work or maybe i did something wrong idk
@@mohamedal-qadeery6530 Add the property to the Manager and also configure it with HasMany inside the ManagerConfiguration.
Amazing content as always
Thank you my friend!
Nice video! For future ones, would be happy to see some more explanations on why what you talk about is useful!
Thank you very much! Can you give me an example of what needed more explanation?
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(Ping).Assembly)); What does this mean? I'm using this, but the Handler is not being executed.
Very good utility video. Your channed seem to be underappreciated, very useful stuff, but you are hard to find.
Thank you very much!!! Yeah, i hope it'll grow a little at some point!
I didn't watched video about scoped yet and why it breaks app, but it is stil strange to me why it must be transient.
Maybe the video about blazor services lifetime will make it clear. If not, I will happily discuss it :)
in console app how use mediatR 12?
What do you mean by "use"? How you register it? If that's the case, you can register it like in asp, given that you have set up dependency injection for your console application.
Bro, your Benchmark is really bad. At first it is a very limited example. Second you are comparing an synchronous implementation to an asynchronous implementation with a synchronous problem. Maybe you should add a more complex calculation example to benchmark both approaches. Something like sum up 1000 lists where each list contains 100k entries. Then lets see how your synchronous code performs campared to your async implementation. The next thing is that asynchronous code is not meant to make your code "faster", but more responsive. This is the key takeaway of async await. You trade a little bit of synchronous performance for an unblocking application in a mulit threaded environment. So saying that async await should only be used with long running tasks or IO Operations is not correct. Action Methods in MVC should be using async await as well to ensure that the server can handle large loads of requests. But you do not have to await every task. In some cases it is totally fine to just return a Task without awaiting it and let the consumer of the task decide when to wait for this. Async code is nothing that is is easy and nothing for what simple rules apply.
That's the point. That using asynchronous implementation with synchronous code is not ideal. That's why i used the EF example and i mentioned libraries, like the EF, that provide sync and async methods for the same operation. That's exactly what I said. That there is always going to be an overhead, but the benefits outweigh that in some cases because we delegate the task to a different thread, so the current one is free to do other work. About the third argument I don't know what does it have to do with this video. Yes, if you are inside a method that returns a task and the only async call is to calculate the returned result you can return that without waiting it. But that's not always the case and again someone needs at some point to await that and you still have some overhead. Overall i don't think that i communicated something different from what you wrote in your first two paragraphs.
Great video m8 :) One problem that i keep getting now duplicates of the validation errors for some reason in my solution god knows why . :P
That's interesting. Did you try to put breakpoints in the behaviors to see what's happening?
I use result types. They work really well with behaviour pipelines in mediator. My pipelines go Performance (removed in production) => Logging => unhandled exception handler => Authorization => caching => Handler I think that’s the right order, not got my laptop on me to double check Results all the way down make it work really nicely.
Slight critique, what you are doing is publishing integration events, not domain events. Domain events should be handled in the same transactional scope as the current request (i.e. the whole transaction should roll back if the domain event handlers fail).
You're right. Maybe I should have used a transaction or an example that the events change the state of an entity, but not call the SaveAsync and publish them before i persist any changes, so the save call save them all together, but i wanted to focus on the publishing side of things!
@@spyroskatsios it’s an incredibly complex topic that is giving me no end of headaches. This is a really good video though that works perfectly well when you’re not being a linguistic purist!
Perfect 👍
Thank you!
I had a live coding interview a few years ago and they asked me to solve precisely this topic. Thanks for your video.
You are welcome! Hope you did well in the interview!
but how i can stop its from auto including the relation ?
What do you mean? If you set in your configurations how you want to handle your relations, it will not set them automatically. Maybe i didn't understand the question, can you give me more context?
@@spyroskatsios lets say i have a use case where i just need the person name and i dont need to include all the relations like credit cards,etc ... because by default based on the video everytime when u get the person it also includes the relation (all credit cards)
@@mohamedal-qadeery6530 Now i got it, thanks. Since they are owned entities you can't by default not include them. You can use a select and retrieve only the fields you need in this specific use case. If you have multiple read use cases like this in your project, but you still want those entities to be configured as owned, you can maybe have a different dbContext for the reads.
@@spyroskatsios can u make video or code sample in the future ? And thanks alot
@@mohamedal-qadeery6530You are welcome! About using a select clause to project to a custom object i don't think there is a lot to do. If you are talking about the second dbContext i have one: ua-cam.com/video/QkHfBNPvLms/v-deo.html
Your content is so amazing im sure your channel will be big in the future !
Thank you very much!
Great video !! but it will better if u will increase the font size and thank you :)
Thank you, i will!
plz share the code for this
Added link to the description
Thank you that helps
You are welcome!
Great video needed this
Thank you!
very helpful video my friend , could you make a video on consuming wsdl soap web services using aps core and what is the best practices doing so , thanks again for awesome videos 👌for 2 cases: - we have a wsdl link and using it to generated C# code - no wsdl link was given, only just the definition of the request and response scheme messages
Hey Ebrahim! Unfortunately I don't have any experience in this area, I'm sorry.
@@spyroskatsios no worries my friend, I understand it is a not common to work with soap this days , but if you find your self integrating with banks and Telecom providers as I do 😅you will need to come up with different ways of doing it .