コード例 #1
0
        public async Task <LogCalorieResult> LogCalorie(LogCalorieDto logDto)
        {
            var command = new LogCalorieCommand(logDto);
            var handler = _commands.Build(command);

            return(await handler.ExecuteAsync());
        }
コード例 #2
0
 public ICommandHandler <LogCalorieCommand, LogCalorieResult> Build(LogCalorieCommand cmd)
 => new LogCalorieHandler(cmd, _ctx);