Spyros Katsios
Spyros Katsios
  • 63
  • 49 729
CI/CD with GitHub Actions: Build & Push Docker Images to Docker Hub
Hi there! Today we are going to see how to build and push a Docker image to Docker Hub, as part of your CI/CD pipeline, using GitHub Workflows.
yaml file:
name: Build and push to Dockerhub
on:
push:
branches:
- main
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6.13.0
with:
context: .
file: ./Weather.Api/Dockerfile
push: true
tags: |
repo-name:${{ github.sha }}
repo-name/weather-api:latest
#GitHubActions #Docker
Переглядів: 112

Відео

Assertions with Shouldly
Переглядів 13021 день тому
Hi there! Since Fluent Assertions library changed their license, let's see an alternative! Shouldly Documentation: docs.shouldly.org #csharp #dotnet #shouldly
What's Wrong with Microservices?
Переглядів 8928 днів тому
Hi there! Today we are going to talk about microservices, the bad reputation sometimes get and why that is. #csharp #dotnet #microservices
WireMock With Testcontainers
Переглядів 81Місяць тому
Hi there! Today we are going to see how we can use WireMock with Testcontainers for our Integration Tests. #csharp #dotnet #wiremock
Making Local Development with Azure Service Bus Effortless
Переглядів 1572 місяці тому
Hi there! Today we are going to see how local development, when using azure service bus, can became easy! #csharp #dotnet
Handling Concurrency Conflicts with Entity Framework
Переглядів 2442 місяці тому
Hi there! Today we are going to see how we can handle concurrency conflicts with Entity Framework, using the optimistic concurrency approach! Chapters: 00:00 : The Problem 03:45 : What is Versioning 05:17 : Versioning (SQL Server) 06:25 : Versioning (Generic Solution) #csharp #dotnet #entityframework
Hangfire Dashboard
Переглядів 4343 місяці тому
Hi there! Today we are going to see how we can add a useful Hangfire Dashboard. #csharp #dotnet #hangfire
Domain Events with Dapper
Переглядів 2265 місяців тому
Hi there! Today we are going to see how we can publish Domain Events when we are using Dapper as out ORM. #csharp #dotnet
TimeSpan Explained
Переглядів 1236 місяців тому
Hi there! Probably you are already familiar with TimeSpans in .net, but in this short video we take a closer look at them.
How to Mock Identity in Integration Tests
Переглядів 2527 місяців тому
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! #csharp #dotnet
MediatR in depth (Part 4: Streaming)
Переглядів 1728 місяців тому
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)
Переглядів 1628 місяців тому
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)
Переглядів 1619 місяців тому
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)
Переглядів 26810 місяців тому
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
Переглядів 31111 місяців тому
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
Переглядів 136Рік тому
Introduction to Redis
The OwningComponentBase Class of Blazor Server
Переглядів 178Рік тому
The OwningComponentBase Class of Blazor Server
Introduction to Value Objects
Переглядів 563Рік тому
Introduction to Value Objects
Introduction to IAsyncEnumerable
Переглядів 284Рік тому
Introduction to IAsyncEnumerable
How to Implement the Result Pattern with the ErrorOr Library
Переглядів 2,5 тис.Рік тому
How to Implement the Result Pattern with the ErrorOr Library
How to create a Mediator from scratch (Part 2)
Переглядів 172Рік тому
How to create a Mediator from scratch (Part 2)
How to create a Mediator from scratch (Part 1)
Переглядів 305Рік тому
How to create a Mediator from scratch (Part 1)
What Eventual Consistency means
Переглядів 115Рік тому
What Eventual Consistency means
How to use Output Cache with Authentication
Переглядів 1,2 тис.Рік тому
How to use Output Cache with Authentication
Automating Service Registration with Reflection
Переглядів 476Рік тому
Automating Service Registration with Reflection
Dependency Injection with Scrutor: Scanning and Registering
Переглядів 1,4 тис.Рік тому
Dependency Injection with Scrutor: Scanning and Registering
Why sometimes async and await are bad for your app
Переглядів 218Рік тому
Why sometimes async and await are bad for your app
Should you use Result as your return type?
Переглядів 316Рік тому
Should you use Result as your return type?
Add vs AddAsync - Which one should you use?
Переглядів 603Рік тому
Add vs AddAsync - Which one should you use?
How to create Custom Validation Attributes
Переглядів 318Рік тому
How to create Custom Validation Attributes

КОМЕНТАРІ

  • @amandaosvaldo953
    @amandaosvaldo953 4 дні тому

    I Liked :3

  • @astraBinary
    @astraBinary 28 днів тому

    Hello, Isn't simpler actually to just go with lets say in your example with ACID transactions?

    • @spyroskatsios
      @spyroskatsios 28 днів тому

      Hi! That would be the pessimist approach, where you would have to lock the row (there are different type of locks) which could impact the performance of the application. As a general rule, if you wait that type of collisions to appear rarely, it's preferred to use the optimistic approach. But it in the end of the day it's a trade-off and comes down to what you need for your app.

  • @georgiosanthopoulos3719
    @georgiosanthopoulos3719 29 днів тому

    Interesting Video! 👍

  • @MohitVishwakarma-vo8ke
    @MohitVishwakarma-vo8ke Місяць тому

    Could you please provide the code... Thanks in advance

    • @spyroskatsios
      @spyroskatsios Місяць тому

      Hi! Since i don't have yet a solution for sharing the source code, you can download it from google drive: drive.google.com/file/d/16QPxheaIt57G2MKicC3KuwBv1wH_AalW/view

  • @masaftic
    @masaftic 2 місяці тому

    i was wondering how to do that with a void method. Didn't know you can do an ErrorOr<Success> Thanks for the tutorial

  • @roslanbainal5914
    @roslanbainal5914 2 місяці тому

    Hi, after we implement that approach (in video), can we integrate with polly for retry part instead of returning an exception directly or any suggestions ?

    • @spyroskatsios
      @spyroskatsios 2 місяці тому

      Hi! You can always catch the exception (in a global exception handler for example) and return the appropriate message. Just retrying will not change anything since the row in the database will have a different version, which is also the point. You can retry to update some of the values, IF that's something you want. More details about that here: learn.microsoft.com/en-us/ef/core/saving/concurrency?tabs=data-annotations

    • @roslanbainal5914
      @roslanbainal5914 2 місяці тому

      @@spyroskatsios thank you for the explanation.

  • @RaZziaN1
    @RaZziaN1 2 місяці тому

    Very useful video, with real practical meaning in real apps. I think first you should start with adding simple property and if instead of using change tracker and slowly make it more complex. Most of time we need it on 1-2 endpoints. What about handling it with transactions ? I had one app where i had concurrency error but debugging was impossible, how to debug it ? Some event was changing something and data fetched by user was already "dirty"

    • @spyroskatsios
      @spyroskatsios 2 місяці тому

      Hi! Thank you for your kind words! I didn't get exactly the problem, but maybe you want to take a look at transaction isolation levels?

  • @Tefery
    @Tefery 3 місяці тому

    And now, all the calls to that API are unauthenticated... The cache management it's before authentication, you have to be more carefull of what you do, it something cannot be done by default, ask yourself why... EDIT: I just had to add the cache after adding the authentication instead of adding it at the beginning 🤣🤣

    • @spyroskatsios
      @spyroskatsios 3 місяці тому

      What do you mean ' all the calls to that API are unauthenticated' ??

    • @Tefery
      @Tefery 3 місяці тому

      @@spyroskatsios Just the first call to the API are Authenticated, because the cache it's resolved before the authentication, so, meanwhile the call it's cached, the authentication it's bypassed

    • @spyroskatsios
      @spyroskatsios 2 місяці тому

      @@Tefery It's not resolved before the authentication. The Authentication Middleware is before the cache one. Maybe you are looking at the order of the Attributes? If yes, the order of middleware components in the request pipeline is the one that matters.

    • @Tefery
      @Tefery 2 місяці тому

      @@spyroskatsios True, I just had to add the cache after adding the authentication instead of adding it at the beginning 🤣🤣

  • @thinktanium9789
    @thinktanium9789 3 місяці тому

    excellent video, i have a unit of work that works like your people service. i was gana make some stupid solution work but transient seems the way to go, thank you!

  • @JyotiGupta-gu5kk
    @JyotiGupta-gu5kk 3 місяці тому

    Give git for access the code

    • @spyroskatsios
      @spyroskatsios Місяць тому

      Hi! Since i don't have yet a solution for sharing the source code, you can download it from google drive: drive.google.com/file/d/1hZLSkDMGZw5DGfyYlwauR3Ysi9Qqbp1f/view?usp=sharing

    • @JyotiGupta-gu5kk
      @JyotiGupta-gu5kk Місяць тому

      Thanc​@@spyroskatsios

  • @fresh0bm
    @fresh0bm 4 місяці тому

    How to user ErrorOr with void methods? Let's say I would like to validate errors on caller side but don't wanna return anything as result from the method.

    • @spyroskatsios
      @spyroskatsios 4 місяці тому

      I don't get exactly what you want to achieve, but the erroror as every result pattern library have the usage of returning some kind of union (one or the other), so if you are using a method that returns void, you are not using the library

    • @fresh0bm
      @fresh0bm 4 місяці тому

      So in void method we can't have error or what?

    • @spyroskatsios
      @spyroskatsios 4 місяці тому

      You can use ErrorOr<Success> so you can return Success if not failed and the error otherwise.

  • @unhandledexception1948
    @unhandledexception1948 4 місяці тому

    Thank you Spiro, excellent video on this important pattern... great supplement to the docs of the library

  • @majormartintibor
    @majormartintibor 5 місяців тому

    Good video.

  • @gtavgameplaytv2200
    @gtavgameplaytv2200 5 місяців тому

    Best video about ElasticSearch i have been seen, thanks a lot!

  • @dotnetwithmark
    @dotnetwithmark 5 місяців тому

    That's a interesting way to handle it. What if we have a worker that works async? I'm aswering because in that type of projects we don't have a MediatR with Pipelines Behaviors.

    • @spyroskatsios
      @spyroskatsios 5 місяців тому

      Hi! The middleware serves the purpose of having everything in a single transaction. So, I guess you can have a transaction whenever you need and publish the events inside of it.

  • @emanuelrodriguez3155
    @emanuelrodriguez3155 5 місяців тому

    great video! thx for the example!

  • @viththagan3547
    @viththagan3547 5 місяців тому

    Excellent Lesson.

  • @emanuelrodriguez3155
    @emanuelrodriguez3155 5 місяців тому

    great video! i would like to see an implementation of publishing the domain events without mediatr

    • @spyroskatsios
      @spyroskatsios 5 місяців тому

      Thank you! Is that what you're looking for? ua-cam.com/video/DUSPIBRjtog/v-deo.htmlsi=l5uD9BeDuyYc1v_4

    • @emanuelrodriguez3155
      @emanuelrodriguez3155 5 місяців тому

      @@spyroskatsios Yes! thank you very much

  • @AmortizedLogN
    @AmortizedLogN 6 місяців тому

    Hey, great video. One thing that I am still wondering with DBContextFactory and Services such as the PeopleService in the video is: how would you coordinate chaging/saving/getting of data across two or more services. Say for example a UserService calls a AddressService?

    • @spyroskatsios
      @spyroskatsios 6 місяців тому

      Hi! I would go with a different approach. Instead of using the DBContextFactory I would use the DbContext as in any other app, but i would create a different scope each time I wanted to call a service. Also, if I was going to use Mediatr I would create my own Dispatcher which would be just a wrapper of creating a scope and calling the IMediatr.

  • @Lazzerman42
    @Lazzerman42 6 місяців тому

    u write some code that u say is good - but u give no proof or explanation. Would be helpful if you could point out the MS Learn best practise for DBContext and Blazor and tie that in with your coding.

    • @spyroskatsios
      @spyroskatsios 6 місяців тому

      @@Lazzerman42 I explain what's the issue with scoped services in Blazor in a dedicated video which I have in the description and I mention in my video. Having said that, you could argue about the quality of my video and how well I communicate how Blazor behaves, since those videos were some of my first ones. Maybe at some time in the future I will remake them and have some diagrams as well.

    • @Lazzerman42
      @Lazzerman42 6 місяців тому

      @@spyroskatsios Thanks! Found this, ua-cam.com/video/CalH0TJrhp8/v-deo.html Together with your video it now seems clear. You don't want a long lived DB Context that is used by many different functions, since the context will "collect error, tracking and concurrency state" over time

  • @lexNwimue
    @lexNwimue 6 місяців тому

    Thanks, man. Great stuff!

  • @DrobusMaximus
    @DrobusMaximus 7 місяців тому

    Thank you! Straight to the point and informative.

  • @viththagan3547
    @viththagan3547 7 місяців тому

    Thanks man

  • @BenClarkRobinson
    @BenClarkRobinson 8 місяців тому

    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

  • @mohamedal-qadeery6530
    @mohamedal-qadeery6530 8 місяців тому

    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

    • @spyroskatsios
      @spyroskatsios 8 місяців тому

      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.

  • @ahmadalmasri4416
    @ahmadalmasri4416 9 місяців тому

    that's simple and clean thank you

  • @zefur321
    @zefur321 9 місяців тому

    can i keep rules in database ?

    • @spyroskatsios
      @spyroskatsios 9 місяців тому

      Hi! I suppose you could, but in what form are you going to store them?

    • @zefur321
      @zefur321 9 місяців тому

      @@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?

  • @Pentatonic_Hardcore
    @Pentatonic_Hardcore 9 місяців тому

    Hi, what language you are speaking?

  • @blaatschaap83
    @blaatschaap83 10 місяців тому

    Some high quality stuff here, thanks!

  • @Paul-uo9sv
    @Paul-uo9sv 10 місяців тому

    so don't use the Unit.Value return type at all now?

    • @spyroskatsios
      @spyroskatsios 10 місяців тому

      You can still use it, but since it's a 'contract' for not returning anything, this update removes unnecessary code!

    • @Paul-uo9sv
      @Paul-uo9sv 10 місяців тому

      @@spyroskatsios OK cool thanks

  • @Bujinkan99
    @Bujinkan99 10 місяців тому

    Very hard to see the code, please consider to increase the font size for further videos

    • @spyroskatsios
      @spyroskatsios 10 місяців тому

      Newer videos have bigger font size!

  • @shahrukhkhan3967
    @shahrukhkhan3967 10 місяців тому

    Keep it up 🚀❤

  • @jaymartinez311
    @jaymartinez311 11 місяців тому

    Thanks a million. Exactly what I was looking for with no fluff and straight to the point. Following the channel for sure!

  • @tsaatse
    @tsaatse 11 місяців тому

    It's a great video. One of its kind on this subject matter

  • @bluewhale.068
    @bluewhale.068 11 місяців тому

    oh shiet, accidentally find vid in your channel, althogth have few sub, but very high quanlity, +1 sub bro 🤝

  • @Andy01010
    @Andy01010 11 місяців тому

    Cache invalidation?

    • @spyroskatsios
      @spyroskatsios 11 місяців тому

      If you are talking about manually invalidating it, didn't fit in the logic of that video!

    • @Andy01010
      @Andy01010 11 місяців тому

      @@spyroskatsios yeah that’s the one. Cool, looking forward to your next video :)

  • @Time21
    @Time21 Рік тому

    Very interesting topic. Thanks for making it.

    • @spyroskatsios
      @spyroskatsios Рік тому

      Thank you for your consistent kind words! 😊

  • @Andy01010
    @Andy01010 Рік тому

    Very nice video, any chance you could add repo ?

    • @spyroskatsios
      @spyroskatsios Рік тому

      Of course! github.com/spyroskatsios/UA-cam-SearchFilters

    • @Andy01010
      @Andy01010 Рік тому

      @@spyroskatsios you are a super star :)

  • @atarconcet
    @atarconcet Рік тому

    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.

    • @spyroskatsios
      @spyroskatsios Рік тому

      I like your solution! Thanks for your kind words!

  • @projkbsta
    @projkbsta Рік тому

    thanks for the ErrorOr tutorial

  • @dcernach
    @dcernach Рік тому

    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!

    • @spyroskatsios
      @spyroskatsios Рік тому

      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!

  • @nsa-iwillneverhityou
    @nsa-iwillneverhityou Рік тому

    nice video.

  • @jetonpeche
    @jetonpeche Рік тому

    oh nice thank you !

  • @dcernach
    @dcernach Рік тому

    Simple as it gets! Thanks for this video! Waiting for the next episode!

  • @manchusandy1
    @manchusandy1 Рік тому

    I want to copy the code. Do you have github link for this ?

  • @ChequeWriter
    @ChequeWriter Рік тому

    Good video.

  • @Time21
    @Time21 Рік тому

    The feeling that mechanical keyboards can create a new language when you start typing on them 😅 Nice video

    • @spyroskatsios
      @spyroskatsios Рік тому

      If I don't hear that clicky sound, I don't feel like I'm coding 😂 Thank you!

  • @mohamedal-qadeery6530
    @mohamedal-qadeery6530 Рік тому

    Why we added Hero and cilvilan dbset too in dbcontext ?

    • @spyroskatsios
      @spyroskatsios Рік тому

      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.

  • @mohamedal-qadeery6530
    @mohamedal-qadeery6530 Рік тому

    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 ?

    • @spyroskatsios
      @spyroskatsios Рік тому

      You mean without Discriminators? Like two entities that one has a list of the others?

    • @mohamedal-qadeery6530
      @mohamedal-qadeery6530 Рік тому

      @@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

    • @spyroskatsios
      @spyroskatsios Рік тому

      @@mohamedal-qadeery6530 doesn't it work with the default way, by adding the List to the Manager?

    • @mohamedal-qadeery6530
      @mohamedal-qadeery6530 Рік тому

      @spyroskatsios No it didn't work or maybe i did something wrong idk

    • @spyroskatsios
      @spyroskatsios Рік тому

      @@mohamedal-qadeery6530 Add the property to the Manager and also configure it with HasMany inside the ManagerConfiguration.