Skip to content

Instantly share code, notes, and snippets.

@mdcarmo
Created March 21, 2018 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdcarmo/2eee6d7a673041bfc43f40d7c7de4248 to your computer and use it in GitHub Desktop.
Save mdcarmo/2eee6d7a673041bfc43f40d7c7de4248 to your computer and use it in GitHub Desktop.
Exemplo para injetar a interface do AutoMappper
public class UserController: Controller
{
private UserService _service;
private IMapper _mapper;
/// <summary>
/// Construtor
/// </summary>
/// <param name="service"></param>
/// <param name="mapper"></param>
public UserController(UserService service, IMapper mapper)
{
_service = service;
_mapper = mapper;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment