How to Implement the Result Pattern with the ErrorOr Library

Поділитися
Вставка
  • Опубліковано 10 лют 2025
  • 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: / @amantinband
    ErrorOr github page: github.com/ama...
    #csharp #dotnet

КОМЕНТАРІ • 14

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

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

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

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

    that's simple and clean
    thank you

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

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

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

    thanks for the ErrorOr tutorial

  • @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 so you can return Success if not failed and the error otherwise.