public async Task <ValidationResult> SayHello(HelloViewModel helloViewModel)
 {
     return(await _helloAppService.SayHello(helloViewModel));
 }
Beispiel #2
0
 public async Task <IActionResult> Post([FromBody] HelloViewModel helloViewModel)
 {
     return(!ModelState.IsValid ? CustomResponse(ModelState) : CustomResponse(await _helloAppService.SayHello(helloViewModel)));
 }
Beispiel #3
0
        public async Task <IActionResult> Post([FromBody] HelloViewModel helloViewModel)
        {
            _log.LogInformation($"[{nameof(HelloController)}][{nameof(Post)}]Posted|{JsonSerializer.Serialize(helloViewModel)}");

            return(!ModelState.IsValid ? CustomResponse(ModelState) : CustomResponse(await _helloAppService.SayHello(helloViewModel)));
        }