Honoplay Stack
This will contain all cross-cutting concerns.
Entities Enumerations Logic Exceptions
Interfaces Models Logic Commands / Queries Validators Exceptions
DbContext Migrations Configurations Seeding Abstractions
Implementations, e.g. API Clients File System Email / SMS System Clock Anything external
SPA – Angular or React Web API Razor Pages MVC Web Forms
Redis cache kullanılmış metotları test ederken yapılan dependency injection işlemlerinde hata vermesi sebebiyle eklenmiştir. Redis cache için kullanılan IDistributedCache interface'i mocklanmıştır.
https://github.com/moq/moq4 https://www.nuget.org/packages/moq/
Redis cache genellikle çok fazla kullanılan verilere daha hızlı ulaşabilmek için kullanılır. Bu yüzden de kullanılan verileri KEY-VALUE şeklinde RAM üzerine kaydeder. İstenirse sabit disklere de kayıt yapılabilir. Projede giriş yapan AdminUser rolündeki kişinin Departments, TrainerUsers, TraineeUser ile işlem yaparken daha hızlı yapabilmesi için kullanılmıştır.
https://www.nuget.org/packages/Microsoft.Extensions.Caching.Redis/2.2.0
Genellikle JSON serialize ve deserialize yapmak amacıyla kullanılır. Projede ise Redis cache ve Testlerde post request verilerinin serialize ve deserialize etmek amacıyla kullanılmıştır.
Uygulama içi mesajlaşma için kullanılıyor. 3 arayüz önemli:
IRequest IRequestHandler INotification
https://github.com/jbogard/MediatR https://github.com/jbogard/MediatR/wiki
Bir nesne için doğrulama kuralları oluşturmayı sağlar.
https://fluentvalidation.net/start
Honoplay.Persistence klasöründe olduğunu doğruladıktan sonra
dotnet ef migrations add InitialCreate
dotnet ef database update