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(""));
        }
Example #2
0
 public OutputBase Add([FromBody] Diagnose diagnose)
 {
     return(_diagnoseService.Add(diagnose));
 }