예제 #1
0
        public async Task <IActionResult> LogWeight([FromBody] LogWeightDto logDto)
        {
            // TODO : finish this
            var result = await _weightService.LogWeight(logDto);

            return(Ok(new { result.IsSuccess }));
        }
예제 #2
0
        public async Task <LogWeightResult> LogWeight(LogWeightDto logDto)
        {
            var command = new LogWeightCommand(logDto);
            var handler = _commands.Build(command);

            return(await handler.ExecuteAsync());
        }
예제 #3
0
 public LogWeightCommand(LogWeightDto data)
 => this.Data = data;