Ejemplo n.º 1
0
        public static PartCreateViewModel Map(PartCreateOutPutDtoModel model)
        {
            var partViewmodel = new PartCreateViewModel
            {
                BrandWithModels = model.BrandWithModels,
                Categories      = model.Categories,
            };

            return(partViewmodel);
        }
Ejemplo n.º 2
0
        public static PartCreateOutPutDtoModel Map(IList <string> brandWithModelsNames, IList <string> categoriesNames)
        {
            var partModel = new PartCreateOutPutDtoModel
            {
                BrandWithModels = brandWithModelsNames.OrderBy(x => x).ToList(),
                Categories      = categoriesNames.OrderBy(x => x).ToList(),
            };

            return(partModel);
        }