示例#1
0
        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
 private static DishTagCreateRequest CreteDishCreateRequest(DishCommand dishCommand, DishCreateRequest dishCreateRequest)
 {
     return(new DishTagCreateRequest {
         DishId = dishCommand.Id, TagIds = dishCreateRequest.TagIds
     });
 }