private async Task LoadUserRoles() { var dt = await bALUser.GetUserRoleAsync(); List <UserRole> userRoles = new List <UserRole>(); foreach (DataRow dr in dt.Rows) { userRoles.Add(new UserRole() { UserRoleID = dr["UserRoleID"].ToInt32(), UserRoles = dr["UserRole"].ToText() }); } ViewBag.UserRoles = userRoles; }