Update title case formatter for AutoMapper
This commit is contained in:
@@ -17,8 +17,8 @@ namespace MileageTraker.Web.ViewModels.CreateLog
|
||||
|
||||
static ConfirmCreateLogViewModel()
|
||||
{
|
||||
Mapper.CreateMap<CreateLogViewModel, ConfirmCreateLogViewModel>()
|
||||
.ForMember(c => c.CityName, opt => opt.AddFormatter(new TitleCaseFormatter()));
|
||||
Mapper.CreateMap<CreateLogViewModel, ConfirmCreateLogViewModel>()
|
||||
.ForMember(c => c.CityName, opt => opt.ResolveUsing(vm => vm.CityName.ToTitleCase()));
|
||||
}
|
||||
|
||||
public ConfirmCreateLogViewModel(CreateLogViewModel createLogViewModel)
|
||||
|
||||
Reference in New Issue
Block a user