public PartialViewResult RoleRelatedUsersDelete(string role_id, string id) { GenelRepository gnlDB = RepositoryManager.GetRepository <GenelRepository>(); gnl_roles_related_users role_related_users = new gnl_roles_related_users(); Role model = new Role(); Guid role_uid = Guid.Empty; Guid user_uid = Guid.Empty; if (Guid.TryParse(role_id, out role_uid) && BaseFunctions.getInstance().IsNumeric(id)) { var obj = gnlDB.GetRoleRelatedUsersById(Convert.ToInt32(id)); if (obj != null && obj.Count > 0) { gnlDB.DeleteRoleRelatedUsers(obj[0]); } } List <gnl_role_related_users_v> listRoleRelatedUsers = gnlDB.GetRoleRelatedUsers(role_uid); model.roleRelatedUsers = listRoleRelatedUsers; return(PartialView("RoleRelatedUsers", model)); }