From f85d17f34e9b817415cc2f2f931e934500f12a18 Mon Sep 17 00:00:00 2001 From: Nikoo Asadnejad Date: Fri, 3 May 2024 11:19:18 +0330 Subject: [PATCH] feat: add getProductQuery --- .../obj/rider.project.model.nuget.info | 2 +- .../Product.Application.csproj | 1 - .../Queries/GetProduct/GetProductQuery.cs | 5 +++++ .../GetProduct/GetProductQueryHandler.cs | 11 +++++++++++ .../GetProduct/GetProductQueryResponse.cs | 17 +++++++++++++++++ .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- .../obj/rider.project.model.nuget.info | 2 +- 13 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 Src/Product.Application/Product/Queries/GetProduct/GetProductQuery.cs create mode 100644 Src/Product.Application/Product/Queries/GetProduct/GetProductQueryHandler.cs create mode 100644 Src/Product.Application/Product/Queries/GetProduct/GetProductQueryResponse.cs diff --git a/Src/Product.API/obj/rider.project.model.nuget.info b/Src/Product.API/obj/rider.project.model.nuget.info index 0ea6103..973099a 100644 --- a/Src/Product.API/obj/rider.project.model.nuget.info +++ b/Src/Product.API/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716062710207 \ No newline at end of file +17109444857679871 \ No newline at end of file diff --git a/Src/Product.Application/Product.Application.csproj b/Src/Product.Application/Product.Application.csproj index c0c8406..9dbfc12 100644 --- a/Src/Product.Application/Product.Application.csproj +++ b/Src/Product.Application/Product.Application.csproj @@ -15,7 +15,6 @@ - diff --git a/Src/Product.Application/Product/Queries/GetProduct/GetProductQuery.cs b/Src/Product.Application/Product/Queries/GetProduct/GetProductQuery.cs new file mode 100644 index 0000000..a7729fe --- /dev/null +++ b/Src/Product.Application/Product/Queries/GetProduct/GetProductQuery.cs @@ -0,0 +1,5 @@ +using MediatR; + +namespace Product.Application.Product.Queries.GetProduct; + +public record GetProductQuery(int Id) : IRequest; \ No newline at end of file diff --git a/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryHandler.cs b/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryHandler.cs new file mode 100644 index 0000000..2148352 --- /dev/null +++ b/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryHandler.cs @@ -0,0 +1,11 @@ +using MediatR; + +namespace Product.Application.Product.Queries.GetProduct; + +public class GetProductQueryHandler : IRequestHandler +{ + public Task Handle(GetProductQuery request, CancellationToken cancellationToken) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryResponse.cs b/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryResponse.cs new file mode 100644 index 0000000..703d7e3 --- /dev/null +++ b/Src/Product.Application/Product/Queries/GetProduct/GetProductQueryResponse.cs @@ -0,0 +1,17 @@ +namespace Product.Application.Product.Queries.GetProduct; +public class GetProductQueryResponse +{ + public GetProductQueryResponse(string title , string subTitle , string description , string category) + { + Title = title; + SubTitle = subTitle; + Description = description; + Category = category; + } + + public string Title { get; } + public string? SubTitle { get;} + public string? Description { get; } + public string Category { get; } + +} \ No newline at end of file diff --git a/Src/Product.Application/obj/rider.project.model.nuget.info b/Src/Product.Application/obj/rider.project.model.nuget.info index a7b9faf..b337314 100644 --- a/Src/Product.Application/obj/rider.project.model.nuget.info +++ b/Src/Product.Application/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17109444019949048 \ No newline at end of file +17109444857660281 \ No newline at end of file diff --git a/Src/Product.Domain/obj/rider.project.model.nuget.info b/Src/Product.Domain/obj/rider.project.model.nuget.info index e4d4724..4a5bfd7 100644 --- a/Src/Product.Domain/obj/rider.project.model.nuget.info +++ b/Src/Product.Domain/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716062584938 \ No newline at end of file +17109444857633001 \ No newline at end of file diff --git a/Src/Product.Infrastructure/obj/rider.project.model.nuget.info b/Src/Product.Infrastructure/obj/rider.project.model.nuget.info index c338ebf..1bf3bd3 100644 --- a/Src/Product.Infrastructure/obj/rider.project.model.nuget.info +++ b/Src/Product.Infrastructure/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17109439871574448 \ No newline at end of file +17109444857661896 \ No newline at end of file diff --git a/Src/Product.Ioc/obj/rider.project.model.nuget.info b/Src/Product.Ioc/obj/rider.project.model.nuget.info index 4e50649..b8ab746 100644 --- a/Src/Product.Ioc/obj/rider.project.model.nuget.info +++ b/Src/Product.Ioc/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716062591402 \ No newline at end of file +17109444857666370 \ No newline at end of file diff --git a/Tests/Product.Api.Tests/obj/rider.project.model.nuget.info b/Tests/Product.Api.Tests/obj/rider.project.model.nuget.info index b629624..0e31a07 100644 --- a/Tests/Product.Api.Tests/obj/rider.project.model.nuget.info +++ b/Tests/Product.Api.Tests/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716063485879 \ No newline at end of file +17109444857986117 \ No newline at end of file diff --git a/Tests/Product.Application.Tests/obj/rider.project.model.nuget.info b/Tests/Product.Application.Tests/obj/rider.project.model.nuget.info index 0c5a41b..04d113a 100644 --- a/Tests/Product.Application.Tests/obj/rider.project.model.nuget.info +++ b/Tests/Product.Application.Tests/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716063478327 \ No newline at end of file +17109444857993886 \ No newline at end of file diff --git a/Tests/Product.Domain.Tests/obj/rider.project.model.nuget.info b/Tests/Product.Domain.Tests/obj/rider.project.model.nuget.info index c929c48..23cb42e 100644 --- a/Tests/Product.Domain.Tests/obj/rider.project.model.nuget.info +++ b/Tests/Product.Domain.Tests/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716063485559 \ No newline at end of file +17109444857992960 \ No newline at end of file diff --git a/Tests/Product.Infrastructure.Tests/obj/rider.project.model.nuget.info b/Tests/Product.Infrastructure.Tests/obj/rider.project.model.nuget.info index 2159824..3029ff4 100644 --- a/Tests/Product.Infrastructure.Tests/obj/rider.project.model.nuget.info +++ b/Tests/Product.Infrastructure.Tests/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17088716063484379 \ No newline at end of file +17109444857995391 \ No newline at end of file