public RecipeController( RecipeFacade recipeFacade, IngredientFacade ingredientFacade) { _recipeFacade = recipeFacade; _ingredientFacade = ingredientFacade; }
static void Main(string[] args) { IngredientFacade ingredientFacade = new IngredientFacade(); List <IngredientModel> ingredientModels = new List <IngredientModel>(); ingredientModels.Add(ingredientFacade.GetById(1)); RecipeFacade recipeFacade = new RecipeFacade(); RecipeModel recipeModel = new RecipeModel { CookingDifficulty = CookingDifficulties.Hard, CreateDate = DateTime.Now, Category = Categories.Dušení, NumberOfServings = 5, PreparationProcess = "Uvařte pokapte snězte", RecipeName = "Bábovka", TimeToBakeAndCookInMinits = 50, TimeToPrepareInMinits = 70, Ingredients = ingredientModels, AuthorId = 1, }; Console.WriteLine(recipeFacade.GetById(2).CookingDifficulty); }
public RecipeController( RecipeFacade recipeFacade, IngredientFacade ingredientFacade, ISerializerService serializerService) { _recipeFacade = recipeFacade; _ingredientFacade = ingredientFacade; this.serializerService = serializerService; }
public RecipeListViewModel(RecipeFacade recipeFacade, IMediator mediator) { _recipeFacade = recipeFacade; _mediator = mediator; RecipeSelectedCommand = new RelayCommand <RecipeListModel>(RecipeSelected); RecipeNewCommand = new RelayCommand(RecipeNew); mediator.Register <UpdateMessage <RecipeWrapper> >(RecipeUpdated); mediator.Register <DeleteMessage <RecipeWrapper> >(RecipeDeleted); }
public RecipeDetailViewModel( RecipeFacade recipeFacade, IMessageDialogService messageDialogService, IMediator mediator, IIngredientAmountDetailViewModel ingredientAmountDetailViewModel) { _recipeFacade = recipeFacade; _messageDialogService = messageDialogService; _mediator = mediator; IngredientAmountDetailViewModel = ingredientAmountDetailViewModel; SaveCommand = new AsyncRelayCommand(SaveAsync, CanSave); DeleteCommand = new AsyncRelayCommand(DeleteAsync); mediator.Register <NewMessage <IngredientAmountWrapper> >(NewIngredientAmount); mediator.Register <UpdateMessage <IngredientAmountWrapper> >(UpdateIngredientAmount); mediator.Register <DeleteMessage <IngredientAmountWrapper> >(DeleteIngredientAmount); }
public RecipeController(RecipeFacade recipeFacade) { this.recipeFacade = recipeFacade; }
public RecipeFacadeTests(ITestOutputHelper output) : base(output) { _facadeSUT = new RecipeFacade(UnitOfWorkFactory, Mapper); }
public RecipeController(RecipeFacade facade) { _facade = facade; }
protected override async Task OnInitializedAsync() { Recipes = await RecipeFacade.GetRecipesAsync(); await base.OnInitializedAsync(); }