Example #1
0
        public async Task <IActionResult> GetUser(int id)
        {
            var user = await _repo.GetUser(id);

            // Execute a mapping from the (source object) to a new <destination object> with supplied mapping options.
            var userToReturn = _mapper.Map <UserForListDTO>(user);

            return(Ok(userToReturn));
        }