Skip to content

Commit 41d4b08

Browse files
author
kadir.avci
committed
Adding CQRS pattern
1 parent 95d8458 commit 41d4b08

File tree

17 files changed

+106
-99
lines changed

17 files changed

+106
-99
lines changed
217 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
1.37 MB
Binary file not shown.

Data/Command/ICommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Data.Command
2+
{
3+
public interface ICommand
4+
{
5+
}
6+
}

Data/Command/ICommandDispatcher.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Data.Command
2+
{
3+
public interface ICommandDispatcher
4+
{
5+
void Execute<TCommand>(TCommand command) where TCommand : ICommand;
6+
}
7+
}

Data/Command/ICommandHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Data.Command
2+
{
3+
public interface ICommandHandler<TCommand> where TCommand : ICommand
4+
{
5+
void Execute(TCommand command);
6+
}
7+
}

Data/Query/IQuery.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Data.Query
2+
{
3+
public interface IQuery
4+
{
5+
}
6+
}

Data/Query/IQueryDispatcher.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Data.Query
2+
{
3+
public interface IQueryDispatcher<TResult> where TResult : IQuery
4+
{
5+
TResult Execute<TQuery>(TQuery query) where TQuery : IQuery;
6+
}
7+
}

Data/Query/IQueryHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Data.Query
2+
{
3+
//public interface IQueryHandler where TQuery : IQuery
4+
//{
5+
// TResult Execute(TQuery query);
6+
//}
7+
}

0 commit comments

Comments
 (0)