//[ValidateAntiForgeryToken] public Boolean SelectedWishListAjax(WhishUpdationModel lmd) { Boolean TheResult = false; /*if (!ModelState.IsValid) * { * return TheResult; * } */ Connection.Connection con = new Connection.Connection(); foreach (var item in lmd.Goods) { TheResult = con.UpdateGood(item); if (TheResult == false) { break; } } return(TheResult); }