public async Task <ActionResult> user_add(usersModel um) { int a = Convert.ToInt32(um.user_identity); List <roleModel> list1 = await iro.RoleSelect(); foreach (roleModel item in list1) { if (item.r_id == a) { um.user_identity = item.user_identity; } ; } if (ModelState.IsValid) { if (await iub.UserCreate(um) > 0) { return(RedirectToAction("user_list")); } else { await NewMethod(); return(View(um)); } } else { await NewMethod(); return(View(um)); } }