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

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

            return(await handler.ExecuteAsync());
        }
Esempio n. 3
0
 public LogWeightCommand(LogWeightDto data)
 => this.Data = data;