Friday, December 31, 2021
Monday, November 29, 2021
Implement CQRS with MediatR in ASP.NET Core Web API
- · Accept the incoming request
- · Handles the incoming request and provide the response.
Advantages of CQRS
- Independent scaling
- Optimized data transfer objects
- Provides separation of concern
- High scalability
Sunday, November 14, 2021
Angular Help
https://nodejs.org/en/download/
Publish : ng build is the command you use when you're ready to build your application and deploy it.
Run the command
npm install
in the terminal. This command will read thepackage.json
file and install all the required dependencies into anode_modules
folder in your project.
C:\>node -v
c:\users\ng --version
c:\users>npm install @angular/cli
npm install -g @angular/cli@1.0.0 //npm install @angular/cli@latest //npm install -g @angular/cli@latest
ng serve -- open
npm start
open vs project in VS code: code .
npm install -g @angular/cli@9.1.11
npm uninstall -g @angular/cli
Angular CLI Commands : https://www.c-sharpcorner.com/article/quick-preview-angular-cli-commands/
ng generate module/component/service/class name
ng generate component login //ng generate component register
ng g c login
ng generate module user-auth //1 file
ng g c user-auth/sign-in // component under module
ng g class Dummy
ng g service api-service
ng g service user-auth/test-service //service under module
ng build --prod //ng build --dev
ngOnInit :
Executes after the constructor and after ngOnChange hook for the first time. It is most commonly used for component initialisation and retrieving data from a database
<form (submit)="onSubmit()"> <input [(ngModel)]="playerName"> </form> let playerName: string; onSubmit() { return this.playerName; }
Interview: https://www.youtube.com/watch?v=-jeoyDJDsSM
Thursday, October 21, 2021
Wednesday, October 20, 2021
Sunday, August 22, 2021
Strategy_Pattern
namespace WindowsFormsApp
{
public interface IEmployeeSal
{
float GetSalary(int basic,float dividend,float commission);
}
}
namespace WindowsFormsApp
{
public class HRDeptSalary : IEmployeeSal
{
// @Override
public float GetSalary(int basic, float dividend, float commission)
{
return basic + dividend+commission;
}
}
public class SalesDept : IEmployeeSal
{
// @Override
public float GetSalary(int basic, float dividend, float commission)
{
return basic + dividend+commission;
}
}
public class PurchaseDept : IEmployeeSal
{
// @Override
public float GetSalary(int basic, float dividend, float commission)
{
return basic + dividend;
}
}
}
namespace WindowsFormsApp
{
public class EmployeeSalary
{
public string EmployeeName { get; set; }
public int Basic { get; set; }
private IEmployeeSal _iEmployeeSal;
public EmployeeSalary(IEmployeeSal iEmployeeSal)
{
this._iEmployeeSal = iEmployeeSal;
}
public float CalculateSalry(int basic, float dividend, float commission)
{
return _iEmployeeSal.GetSalary( basic, dividend, commission);
}
}
}
private void button1_Click(object sender, EventArgs e)
{
//Use the EmployeeSalary to see change in behaviour when it changes its Strategy.
EmployeeSalary objEmpSal = null;
objEmpSal = new EmployeeSalary(new HRDeptSalary());
textBox1.Text = objEmpSal.CalculateSalry(9000,500,50).ToString();
objEmpSal = new EmployeeSalary(new PurchaseDept());
textBox2.Text = objEmpSal.CalculateSalry(5000, 200, 20).ToString();
}
Saturday, January 30, 2021
microservices
What are microservices?
Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilities
- Owned by a small team
Installing on Windows : https://www.rabbitmq.com/install-windows.html
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.12.11\sbin>rabbitmq-plugins.bat listDriving
https://youtube.com/shorts/5Ac2qZHrApU?si=_X-G7pJFHiZoD-s7 https://www.youtube.com/watch?v=f6pSsex87oU
-
ceac.state.gov purbachal sector 21, end of purbachal 300 ft road, just behind the new China Bangladesh Exhibition Center Project (New Ban...
-
PTE Free materials হুমাইরা https://www.bdword.com/english-to-bengali-dictionary-learn-3000-plus-common-words-a-page-1 https://www.bdword....