private DishCommand CreateDishCommand(DishCreateRequest dishRequest) { var dishCommand = new DishCommand { Id = m_idGenerator.GenerateId(), Name = dishRequest.Name, Description = dishRequest.Description, Recipe = dishRequest.Recipe, Difficulty = dishRequest.Difficulty, Duration = dishRequest.Duration, Author = dishRequest.Author, TimeAdded = DateTime.Today }; return(dishCommand); }
private static DishTagCreateRequest CreteDishCreateRequest(DishCommand dishCommand, DishCreateRequest dishCreateRequest) { return(new DishTagCreateRequest { DishId = dishCommand.Id, TagIds = dishCreateRequest.TagIds }); }