public async Task <ActionResult> Create([FromForm] Member model) { if (ModelState.IsValid) { try { var client = new MemberClient(_config); var response = await client.Create(model); if (response.IsSuccessStatusCode) { _toastNotification.AddSuccessToastMessage($"Le member {model.Name} a été ajoutée."); return(RedirectToAction(nameof(Index))); } } catch { return(View(model)); } } return(View(model)); }