/// <summary> /// Convert to the bulletin view model list. /// </summary> /// <param name="srcList">The source list.</param> /// <param name="destList">The dest list.</param> /// <returns></returns> public static Pageable <BulletinViewModel> ToBulletinViewModelList(this IEnumerable <BulletinModel> srcList, Pageable <BulletinViewModel> destList) { if (srcList != null) { foreach (var src in srcList) { destList.Add(src.ToBulletinViewModel()); } } return(destList); }
public static Pageable <GridSortingViewModel> ToGridSortingViewModelList(this IEnumerable <SortModel> src, Pageable <GridSortingViewModel> dest) { if (src != null) { foreach (var s in src) { dest.Add(ExampleMapper.MapToGridSortingViewModel(s)); } } return(dest); }
public static Pageable <DummyViewModel> ToPageableDummyViewModel(IEnumerable <DummyModel> src, Pageable <DummyViewModel> dest) { if (src != null) { foreach (var s in src) { var dummyViewModel = new DummyViewModel(); Map(s, dummyViewModel); dest.Add(dummyViewModel); } } return(dest); }
/// <summary> /// /// </summary> /// <param name="sourceList"></param> /// <returns></returns> public static IPageable <CodeModel> ToPageableCodeModelList(this IList <CodeModel> sourceList) { if (sourceList == null) { return(null); } var targetList = new Pageable <CodeModel>(); foreach (var codeModel in sourceList) { targetList.Add(codeModel); } return(targetList); }
/// <summary> /// Extension method for mapping IList<see cref="DeltaModel"/> to IPageable<see cref="DeltaViewModel"/>. /// </summary> /// <param name="sourceList">Collection of <see cref="DeltaModel"/>.</param> /// <returns>Pageable collection of <see cref="IPageable<DeltaViewModel>"/>.</returns> public static IPageable <DeltaViewModel> ToPageableDeltaViewModel(this IList <DeltaModel> sourceList) { if (sourceList == null) { return(null); } var list = new Pageable <DeltaViewModel>(); foreach (var deltaModel in sourceList) { var deltaViewModel = deltaModel.ToDeltaViewModel(); if (deltaViewModel != null) { list.Add(deltaViewModel); } } return(list); }
/// <summary> /// Extension method for mapping IList<see cref="PropertyModel"/> to IPageable<see cref="PropertyViewModel"/>. /// </summary> /// <param name="sourceList">Collection of <see cref="PropertyModel"/>.</param> /// <returns>Pageable collection of <see cref="IPageable<PropertyViewModel>"/>.</returns> public static IPageable <PropertyViewModel> ToPageablePropertyViewModel(this IList <PropertyModel> sourceList) { if (sourceList == null) { return(null); } var list = new Pageable <PropertyViewModel>(); foreach (var propertyModel in sourceList) { var propertyViewModel = propertyModel.ToPropertyViewModel(); if (propertyViewModel != null) { list.Add(propertyViewModel); } } return(list); }
/// <summary> /// Extension method for mapping IList<see cref="RelatedCodeViewModel"/> to IPageable<see cref="RelatedCodeModel"/>. /// </summary> /// <param name="sourceList">Collection of <see cref="RelatedCodeModel"/>.</param> /// <returns>Pageable collection of <see cref="IPageable<RelatedCodeViewModel>"/>.</returns> public static IPageable <RelatedCodeViewModel> ToPageableRelatedCodeViewModel(this IList <RelatedCodeModel> sourceList) { if (sourceList == null) { return(null); } var list = new Pageable <RelatedCodeViewModel>(); foreach (var relatedCodeModel in sourceList) { var relatedCodeTypeViewModel = relatedCodeModel.ToRelatedCodeViewModel(); if (relatedCodeTypeViewModel != null) { list.Add(relatedCodeTypeViewModel); } } return(list); }
/// <summary> /// Extension method for mapping IList<see cref="CodeModel"/> to IPageable<see cref="CodeTypeViewModel"/>. /// </summary> /// <param name="sourceList">Collection of <see cref="CodeModel"/>.</param> /// <returns>Pageable collection of <see cref="IPageable<CodeTypeViewModel>"/>.</returns> public static IPageable <CodeTypeViewModel> ToPageableCodeTypeViewModelList(this IList <CodeModel> sourceList) { if (sourceList == null) { return(null); } var list = new Pageable <CodeTypeViewModel>(); foreach (var codeModel in sourceList) { var codeTypeViewModel = codeModel.ToCodeTypeViewModel(); if (codeTypeViewModel != null) { list.Add(codeTypeViewModel); } } return(list); }