Esempio n. 1
0
        public async Task <IActionResult> Get(Guid id)
        {
            var cmd    = new GetCompanyByIdQuery(id);
            var result = await _mediator.Send(cmd);

            return(Ok(result));
        }
Esempio n. 2
0
        public async Task <ActionResult <CompanyDto> > GetCompanyById([FromRoute] long companyId)
        {
            var query = new GetCompanyByIdQuery()
            {
                CompanyId = companyId
            };
            var result = await _mediator.Send(query);

            return(Ok(result));
        }