private bool FilterRolePermissions(RolePermission entity)
 {
     return (entity.RoleID == this.RoleID);
 }
 private void DetachRolePermissions(RolePermission entity)
 {
     entity.Role = null;
 }
 private void AttachRolePermissions(RolePermission entity)
 {
     entity.Role = this;
 }
 private bool FilterRolePermissions(RolePermission entity)
 {
     return (entity.PermissionCode == this.Code);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the RolePermissions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRolePermissions(RolePermission rolePermission)
 {
     base.AddObject("RolePermissions", rolePermission);
 }
 /// <summary>
 /// Create a new RolePermission object.
 /// </summary>
 /// <param name="roleID">Initial value of the RoleID property.</param>
 /// <param name="permissionCode">Initial value of the PermissionCode property.</param>
 public static RolePermission CreateRolePermission(global::System.Int32 roleID, global::System.Int32 permissionCode)
 {
     RolePermission rolePermission = new RolePermission();
     rolePermission.RoleID = roleID;
     rolePermission.PermissionCode = permissionCode;
     return rolePermission;
 }