public IActionResult Informations(SellerView seller) { if (ModelState.IsValid) { eCommerce.UpdateSeller(int.Parse(seller.Id), new SellerUpdateModel { Name = seller.Name, PhoneNumber = seller.PhoneNumber }, out ICollection <string> errors); if (errors.Any()) { ViewData[GlobalViewBagKeys.Errors] = errors; } else { SellerView updatedSeller = eCommerce.GetSellerBy(int.Parse(seller.Id)); ICollection <string> messages = new List <string>(); messages.Add("Seller informations updated"); ViewData[GlobalViewBagKeys.Messages] = messages; return(View(updatedSeller)); } } return(View(seller)); }