예제 #1
0
        public static ModelUpdateOutputModel Map(ModelUpdateOutputDtoModel currentModel)
        {
            var model = new ModelUpdateOutputModel()
            {
                ModelId       = currentModel.ModelId,
                ModelName     = currentModel.ModelName,
                StartYear     = currentModel.StartYear,
                EndYear       = currentModel.EndYear,
                ImageAddress  = currentModel.ImageAddress,
                BrandName     = currentModel.BrandName,
                AllBrandNames = currentModel.AllBrandNames,
            };

            return(model);
        }
예제 #2
0
        public static ModelUpdateOutputDtoModel Map(Model currentModel, IList <string> allBrandsName)
        {
            var neededModel = new ModelUpdateOutputDtoModel()
            {
                ModelId       = currentModel.Id,
                ModelName     = currentModel.Name,
                StartYear     = currentModel.StartYear,
                EndYear       = currentModel.EndYear,
                ImageAddress  = currentModel.ImageAddress,
                BrandName     = currentModel.Brand.Name,
                AllBrandNames = allBrandsName,
            };

            return(neededModel);
        }