diff --git a/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs b/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs index 4075936..48a80e6 100644 --- a/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs +++ b/src/Leanetec.EConnect.Client/Articles/PutExtensions.cs @@ -15,9 +15,19 @@ public static class PutExtensions /// The entity to be updated. /// Optional API version to include in the request. /// A representing the asynchronous operation. - public static Task UpdateArticleAsync(this IMediator mediator, Article article, int? apiVersion = null) => - mediator.Send(new PutRequest(article) - { - ApiVersion = apiVersion - }); + public static Task UpdateArticleAsync(this IMediator mediator, Article article, int? apiVersion = null) => mediator.Send(new PutRequest(article) + { + ApiVersion = apiVersion + }); + + /// + /// Sends a request to update an existing using MediatR. + /// + /// The instance used to send the request. + /// The entity to be updated. + /// Optional API version to include in the request. + public static void UpdateArticle(this IMediator mediator, Article article, int? apiVersion = null) => mediator.Send(new PutRequest(article) + { + ApiVersion = apiVersion + }).GetAwaiter().GetResult(); }