public async Task <IActionResult> LogWeight([FromBody] LogWeightDto logDto) { // TODO : finish this var result = await _weightService.LogWeight(logDto); return(Ok(new { result.IsSuccess })); }
public async Task <LogWeightResult> LogWeight(LogWeightDto logDto) { var command = new LogWeightCommand(logDto); var handler = _commands.Build(command); return(await handler.ExecuteAsync()); }
public LogWeightCommand(LogWeightDto data) => this.Data = data;