public static CocktailIngredientDTO ToDTO(this CocktailIngredientsViewModel viewModel) { var cocktailIngredientDTO = new CocktailIngredientDTO { CocktailId = viewModel.CocktailId, IngredientId = viewModel.IngredientId, IngredientName = viewModel.IngredientName }; return(cocktailIngredientDTO); }
public static CocktailIngredientsViewModel ToVM(this CocktailIngredientDTO cocktailIngredientDTO) { var viewModel = new CocktailIngredientsViewModel { CocktailId = cocktailIngredientDTO.CocktailId, IngredientId = cocktailIngredientDTO.IngredientId, IngredientName = cocktailIngredientDTO.IngredientName }; return(viewModel); }
public static CocktailIngredientsViewModel CocktailIngredientDTOMapToVM(this CocktailIngredientsDTO cocktailIngredientDTO) { var cocktailIngredients = new CocktailIngredientsViewModel(); cocktailIngredients.CocktailId = cocktailIngredientDTO.CocktailId; cocktailIngredients.IngredientId = cocktailIngredientDTO.IngredientId; cocktailIngredients.CocktailName = cocktailIngredientDTO.CocktailName; cocktailIngredients.IngredientName = cocktailIngredientDTO.IngredientName; //cocktailIngredientsDTO.Quantity = cocktailIngredient.Quantity; //cocktailIngredientsDTO.Uom = cocktailIngredient.Uom; return(cocktailIngredients); }