public ActionResult ConfirmCategorySort(TransactionsViewModel vm) { TransactionDomainModel ts_dm = new TransactionDomainModel(); var mapper_accs = new MapperConfiguration(cfg => cfg.CreateMap <TransactionsViewModel, TransactionDomainModel>()).CreateMapper(); var trans = mapper_accs.Map <TransactionsViewModel, TransactionDomainModel>(vm); List <TransactionDomainModel> ts_listDomain = ts.CategorySort(trans); List <TransactionsViewModel> VM_ts_list = new List <TransactionsViewModel>(); var mapper_ts = new MapperConfiguration(cfg => cfg.CreateMap <TransactionDomainModel, TransactionsViewModel>()).CreateMapper(); var transactions = mapper_ts.Map <IEnumerable <TransactionDomainModel>, List <TransactionsViewModel> >(ts_listDomain); return(View(transactions)); }