Пример #1
0
        public async Task <MyResponseModel> Get()
        {
            var model = new MyRequestModel
            {
                Name = "Vitaly",
                Age  = 26.256m
            };

            // if you don't need a result
            // await _bus.SendAsync(model);

            // if you need a result
            // var directRes = await _bus.SendAsync<MyRequestModel, MyResponseModel>(model);

            // If you don't want to write a request type in generic method
            // var res = await _bus.Request(model).SendAsync<MyResponseModel>();

            var res = await _bus.Request(model).SendAsync <MyResponseModel>();

            return(res);
        }
Пример #2
0
 public string ThisIsAnotherAction(MyRequestModel request)
 {
     return(string.Empty);
 }