-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60b7315
commit b390a92
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Src/Product.Application/Product/Commands/CreateProduct/CreateProductCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using MediatR; | ||
|
||
namespace Product.Application.Product.Commands; | ||
|
||
public class CreateProductCommand : IRequest | ||
{ | ||
public CreateProductCommand(string title, | ||
decimal price, | ||
string subTitle = default, | ||
string description = default, | ||
int categoryId = default) | ||
{ | ||
Title = title; | ||
SubTitle = subTitle; | ||
Description = description; | ||
Price = price; | ||
CategoryId = categoryId; | ||
} | ||
|
||
public string Title { get; private set; } | ||
public string? SubTitle { get; private set; } | ||
public string? Description { get; private set; } | ||
public decimal Price { get; private set; } | ||
public int CategoryId { get; private set; } | ||
} |
11 changes: 11 additions & 0 deletions
11
Src/Product.Application/Product/Commands/CreateProduct/CreateProductCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using MediatR; | ||
|
||
namespace Product.Application.Product.Commands; | ||
|
||
public sealed class CreateProductCommandHandler : IRequestHandler<CreateProductCommand> | ||
{ | ||
public Task Handle(CreateProductCommand request, CancellationToken cancellationToken) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Src/Product.Application/Product/Commands/CreateProduct/CreateProductCommandValidator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Product.Application.Product.Commands; | ||
|
||
public class CreateProductCommandValidator | ||
{ | ||
|
||
} |