Spontaneous.WebApp.Services.ModelConverter.ToBaseLineViewModel.ToDishModel C# (CSharp) Method

ToDishModel() public method

public ToDishModel ( Dish dishData, string restId, int MenuPId, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : DishModel
dishData Spontaneous.DataModel.Dish
restId string
MenuPId int
lang string
restaurantModel Spontaneous.WebApp.Models.RestaurantModel
return Spontaneous.WebApp.Models.DishModel
        public override DishModel ToDishModel(Dish dishData, string restId, int MenuPId, string lang = DefaultLang, RestaurantModel restaurantModel = null)
        {
            return dishData.ToDishModelBaseLine(restId, MenuPId, lang, restaurantModel);
        }

Same methods

ToBaseLineViewModel::ToDishModel ( Dish dishData, string restId, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : DishModel

Usage Example

        public void ToBaseLineViewModelTest_IfBaseLineSuspiciousStateMustBeZero()
        {
            Dish dish1 = new Dish()
            {
                Name = "dish1",
                Description = "description1",
                NutritionFacts = new NutritionFacts() { TotalCarbohydrate = 2 }
            };

            ToViewModelConverter converter = new ToBaseLineViewModel();

            DishModel dishModel1 = converter.ToDishModel(dish1, "111111");

            Assert.IsTrue(dishModel1.State.Index == 0);
        }
All Usage Examples Of Spontaneous.WebApp.Services.ModelConverter.ToBaseLineViewModel::ToDishModel
ToBaseLineViewModel