public static GridSortingViewModel MapToGridSortingViewModel(SortModel source) { var target = new GridSortingViewModel(); Map(source, target); return(target); }
public static void Map(SortModel source, GridSortingViewModel target) { target.SortingID = source.SortingID; target.Address = source.Address; target.Date = source.Date; target.Time = source.Time; target.PhoneNumber = source.PhoneNumber; target.Duration = source.Duration; target.LargeTextArea = source.LargeTextArea; target.Password = source.Password; target.ImageUrl = source.ImageUrl; target.HtmlContent = source.HtmlContent; }
public static void ToPageableGridSortingViewModel(IEnumerable <SortModel> source, Pageable <GridSortingViewModel> destination) { if (destination == null) { destination = new Pageable <GridSortingViewModel>(); } foreach (var sortModel in source) { var gridSortingViewModel = new GridSortingViewModel(); Map(sortModel, gridSortingViewModel); destination.Add(gridSortingViewModel); } }