Note: Include RequestR.Extensions.Ninject
nuget package.
IKernel kernel = new StandardKernel();
kernel.AddRequestBus();
Retrieve the RequestBus
instance and call the RegisterAllHandlers()
method.
RequestBus requestBus = kernel.Get<RequestBus>();
requestBus.RegisterAllHandlers();
PresentProductsRequest request = new PresentProductsRequest();
MyResponse response = requestBus.Send<MyRequest, MyResponse>(request);