コード例 #1
0
ファイル: DishService.cs プロジェクト: Yazurka/FoodApp
        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);
        }
コード例 #2
0
ファイル: DishService.cs プロジェクト: Yazurka/FoodApp
 private static DishTagCreateRequest CreteDishCreateRequest(DishCommand dishCommand, DishCreateRequest dishCreateRequest)
 {
     return(new DishTagCreateRequest {
         DishId = dishCommand.Id, TagIds = dishCreateRequest.TagIds
     });
 }