Пример #1
0
        public async Task <IActionResult> Get(int id)
        {
            var user = await _repo.GetById <User>(id);

            var userToReturn = _mapper.Map <UserForProfileDto>(user);

            return(Ok(userToReturn));
        }
Пример #2
0
        public async Task <IActionResult> GetById(int id)
        {
            var target = await _repo.GetById <Target>(id);

            var targetToReturn = _mapper.Map <TargetForGetDto>(target);

            return(Ok(targetToReturn));
        }