public async Task <IActionResult> EditDiagnose(Diagnose diagnose)
        {
            if (!ModelState.IsValid)
            {
                return(View(diagnose));
            }
            var diagnoseModel = await _diagnoseService.Get(diagnose.UserId);

            if (diagnoseModel == null)
            {
                _diagnoseService.Add(diagnose);
            }
            else
            {
                await _diagnoseService.Update(diagnose);
            }
            return(Content(""));
        }
Exemplo n.º 2
0
 public async Task <OutputBase> Update([FromBody] Diagnose diagnose)
 {
     return(await _diagnoseService.Update(diagnose));
 }