public async Task <IActionResult> CreateUpdateParticipant(ParticipantCreateUpdateViewModel viewmodel) { var answer = Answer.Error(); if (viewmodel.Id.IsNotEmptyString()) { answer = await Gateway.UpdateParticipant(viewmodel); } else { answer = await Gateway.CreateParticipant(viewmodel); } if (answer.AnswerType == AnswerType.Success) { return(RedirectToAction("Manage")); } else { return(View("CreateUpdateParticipant", viewmodel)); } }