示例#1
0
        public async Task <IActionResult> Get()
        {
            var user = await _userManager.GetByIdentityAsync(this);

            if (user == null)
            {
                return(Unauthorized());
            }

            var companies = await _userCompanyService.GetCompaniesAsync(user);

            return(Ok(_mapper.Map <IEnumerable <Company>, IEnumerable <CompanyDto> >(companies)));
        }