Thursday, February 2, 2023

Technical Stack to build Application

 Fluent Validataion

1. Create Abstratct Validator for Class
2. Add dependency injection for that assembly
https://docs.fluentvalidation.net/en/latest/di.html#automatic-registration


AutoMapper

1. Create Profile
2. Add Dependency injection to the profile
https://docs.automapper.org/en/stable/


Health Check


How To Read configuration


Serilog

 

Logger


Database

services.AddDbContext


Entity Configuration

1. Create simple Modal class => student
2. Add entity configuration for student modal class 
a. derived student entity configuration class from EntityTypeConfiguration ()
EntityTypeConfiguration is defined in System.Data.Entity.ModelConfiguration
b. public class StudentEntityConfiguration: EntityTypeConfiguration<Student>
3. In DBContex class, OnModelCreating function need to add entity configuration
protected override void OnModelCreating(DbModelBuilder modelBuilder)
       {
                    modelBuilder.Configurations.Add(new StudentEntityConfiguration());
        }

https://www.learnentityframeworkcore.com/configuration/fluent-api

https://www.entityframeworktutorial.net/code-first/move-configurations-to-seperate-class-in-code-first.aspx

Repository and UnitOfWork(Genrics)

Unit of work DI Register


Mediator and RabbitMQ

Mediator has 3 method, we can call this method with object derived from IRequest and INotification or using mapper construct object(IRequest/INotification) with plain object

1. Publish
2. Send (Request)
3. Send (Request, Response)

Need send object of 
IRequest
INotification
Need to handle the eventhandler IRequest and INotification handler
 public sealed class MsgEventHandler<T> : IAsyncNotificationHandler<PublishCommand<T>>, IAsyncRequestHandler<SendCommand<T>>
        where T : class



Swagger

https://learn.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-7.0&tabs=visual-studio


Refit


hangfire



Redis


Cors

https://geeksarray.com/blog/how-to-setup-cors-policies-in-aspnet-core-web-api


MassTransit

https://masstransit-project.com/getting-started/


Statemachine

https://www.hanselman.com/blog/stateless-30-a-state-machine-library-for-net-core#:~:text=%22Stateless%22%20is%20a%20simple%20library,achieved%20this%20not%20by%20targeting%20.

https://github.com/dotnet-state-machine/stateless


Polly

React Redux Saga

https://medium.com/ascentic-technology/introduction-to-redux-saga-374cf397a72a

React security-best-practices

https://aglowiditsolutions.com/blog/reactjs-security-best-practices/

Java script


Design Pattern



Azure Devops




AWS Devops

No comments:

Post a Comment