Ejemplo n.º 1
0
        public static CocktailComponentViewModel MapToCocktailComponentVM(this CocktailComponentDTO componentDto)
        {
            var componentVm = new CocktailComponentViewModel();

            componentVm.Quantity     = componentDto.Quantity;
            componentVm.Unit         = componentDto.Unit;
            componentVm.Ingredient   = componentDto.Ingredient;
            componentVm.CocktailId   = componentDto.CocktailId;
            componentVm.IngredientId = componentDto.IngredientId;
            return(componentVm);
        }
Ejemplo n.º 2
0
        public static CocktailComponentDTO MapCockTailComponentVMToDTo(this CocktailComponentViewModel componentViewModel)
        {
            var componentDTO = new CocktailComponentDTO();

            componentDTO.Quantity     = componentViewModel.Quantity;
            componentDTO.Unit         = componentViewModel.Unit;
            componentDTO.Ingredient   = componentViewModel.Ingredient;
            componentDTO.CocktailId   = componentViewModel.CocktailId;
            componentDTO.IngredientId = componentViewModel.IngredientId;
            return(componentDTO);
        }