-
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.
Merge pull request #23 from ilyasbozdemir/case-project
Case project
- Loading branch information
Showing
78 changed files
with
8,275 additions
and
3,374 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
...s/Behaviors/Mapping/BookMappingProfile.cs → ...s/Behaviors/Mapping/BookMappingProfile.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
4 changes: 2 additions & 2 deletions
4
...ator/CreateBookCommandRequestValidator.cs → ...ator/CreateBookCommandRequestValidator.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
12 changes: 12 additions & 0 deletions
12
...ication/Features/BookInventories/Behaviors/Validator/DeleteBookCommandRequestValidator.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,12 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Commands.Requests; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Behaviors.Validator; | ||
|
||
|
||
public class DeleteBookCommandRequestValidator : AbstractValidator<DeleteBookCommandRequest> | ||
{ | ||
public DeleteBookCommandRequestValidator() | ||
{ | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...lication/Features/BookInventories/Behaviors/Validator/GetAllBooksQueryRequestValidator.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,12 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Queries.Requests; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Behaviors.Validator; | ||
|
||
public class GetAllBooksQueryRequestValidator : AbstractValidator<GetAllBooksQueryRequest> | ||
{ | ||
public GetAllBooksQueryRequestValidator() | ||
{ | ||
|
||
} | ||
} | ||
|
4 changes: 2 additions & 2 deletions
4
...Validator/GetBookQueryRequestValidator.cs → ...Validator/GetBookQueryRequestValidator.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
12 changes: 12 additions & 0 deletions
12
...ication/Features/BookInventories/Behaviors/Validator/UpdateBookCommandRequestValidator.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,12 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Commands.Requests; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Behaviors.Validator; | ||
|
||
|
||
public class UpdateBookCommandRequestValidator : AbstractValidator<UpdateBookCommandRequest> | ||
{ | ||
public UpdateBookCommandRequestValidator() | ||
{ | ||
|
||
} | ||
} |
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
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
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
4 changes: 2 additions & 2 deletions
4
...ands/Requests/CreateBookCommandRequest.cs → ...ands/Requests/CreateBookCommandRequest.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
8 changes: 8 additions & 0 deletions
8
...ingApp.Application/Features/BookInventories/Commands/Requests/DeleteBookCommandRequest.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,8 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Commands.Responses; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Commands.Requests; | ||
|
||
public class DeleteBookCommandRequest : IRequest<DeleteBookCommandResponse> | ||
{ | ||
public string IdOrISBN { get; set; } | ||
} |
4 changes: 2 additions & 2 deletions
4
...ands/Requests/UpdateBookCommandRequest.cs → ...ands/Requests/UpdateBookCommandRequest.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
2 changes: 1 addition & 1 deletion
2
...ds/Responses/CreateBookCommandResponse.cs → ...ds/Responses/CreateBookCommandResponse.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
2 changes: 1 addition & 1 deletion
2
...ds/Responses/DeleteBookCommandResponse.cs → ...ds/Responses/DeleteBookCommandResponse.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
2 changes: 1 addition & 1 deletion
2
...ds/Responses/UpdateBookCommandResponse.cs → ...ds/Responses/UpdateBookCommandResponse.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
2 changes: 1 addition & 1 deletion
2
...Features/Books/Events/BookCommandEvent.cs → ...ookInventories/Events/BookCommandEvent.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
2 changes: 1 addition & 1 deletion
2
...s/Books/Events/BookCommandEventHandler.cs → ...ntories/Events/BookCommandEventHandler.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
6 changes: 3 additions & 3 deletions
6
...eries/Handlers/GetAllBooksQueryHandler.cs → ...eries/Handlers/GetAllBooksQueryHandler.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
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
8 changes: 8 additions & 0 deletions
8
...ckingApp.Application/Features/BookInventories/Queries/Requests/GetAllBooksQueryRequest.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,8 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Queries.Responses; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Queries.Requests; | ||
|
||
public class GetAllBooksQueryRequest : IRequest<GetAllBooksQueryResponse> | ||
{ | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
...yTrackingApp.Application/Features/BookInventories/Queries/Requests/GetBookQueryRequest.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,8 @@ | ||
using LibraryTrackingApp.Application.Features.BookInventories.Queries.Responses; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookInventories.Queries.Requests; | ||
|
||
public class GetBookQueryRequest : IRequest<GetBookQueryResponse> | ||
{ | ||
public Guid BookId { get; set; } | ||
} |
2 changes: 1 addition & 1 deletion
2
...ies/Responses/GetAllBooksQueryResponse.cs → ...ies/Responses/GetAllBooksQueryResponse.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
2 changes: 1 addition & 1 deletion
2
...Queries/Responses/GetBookQueryResponse.cs → ...Queries/Responses/GetBookQueryResponse.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
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
32 changes: 30 additions & 2 deletions
32
...ackingApp.Application/Features/BookStocks/Queries/Handlers/GetAllBookStockQueryHandler.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 |
---|---|---|
@@ -1,12 +1,40 @@ | ||
using LibraryTrackingApp.Application.Features.BookStocks.Queries.Requests; | ||
using LibraryTrackingApp.Application.Features.BookStocks.Queries.Responses; | ||
using LibraryTrackingApp.Application.Interfaces.UnitOfWork; | ||
|
||
namespace LibraryTrackingApp.Application.Features.BookStocks.Queries.Handlers; | ||
|
||
public class GetAllBookStocksQueryHandler : IRequestHandler<GetAllBookStockQueryRequest, GetAllBookStockQueryResponse> | ||
{ | ||
public Task<GetAllBookStockQueryResponse> Handle(GetAllBookStockQueryRequest request, CancellationToken cancellationToken) | ||
private readonly IUnitOfWork<Guid> _unitOfWork; | ||
private readonly IMediator _mediator; | ||
private readonly IMapper _mapper; | ||
|
||
public GetAllBookStocksQueryHandler( | ||
IUnitOfWork<Guid> unitOfWork, | ||
IMapper mapper, | ||
IMediator mediator | ||
) | ||
{ | ||
_unitOfWork = unitOfWork; | ||
_mediator = mediator; | ||
_mapper = mapper; | ||
} | ||
public async Task<GetAllBookStockQueryResponse> Handle(GetAllBookStockQueryRequest request, CancellationToken cancellationToken) | ||
{ | ||
throw new NotImplementedException(); | ||
try | ||
{ | ||
return new() { }; | ||
} | ||
catch (Exception ex) | ||
{ | ||
return new() | ||
{ | ||
StatusCode = 500, | ||
Success = false, | ||
StateMessages = new[] { $"Bir hata oluştu: {ex.Message}" } | ||
|
||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.