Reputation: 107
We have used Old version of Automapper in Static Class and Extension method
public static Account GetAccountDomain(this AccountViewModel viewModel)
{
return AutoMapper.Mapper.Map<AccountViewModel, Account>(viewModel);
}
and we had used this without caring about the technology of mapping in Domain and command Handler and Query Handler as following
accountViewModel.GetAccountDomain();
what can we do in dot net core and automapper 10 ?
Upvotes: 0
Views: 198
Reputation: 107
Automapper has removed Static state for better performance. It should use with DI Pattern(IMapper) in all of framework that you need.
Upvotes: 1