Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3962


Ignore:
Timestamp:
06/26/10 11:58:16 (14 years ago)
Author:
hmayr
Message:

changed all association names in linq classes (e.g. form singular to plural, ...) (#1046)

Location:
branches/HeuristicLab.Services.Authentication Prototype
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml

    r3951 r3962  
    1111      <Column Name="Email" Modifier="Virtual" Type="System.String" CanBeNull="false" />
    1212      <Column Name="Comment" Modifier="Virtual" Type="System.String" CanBeNull="false" />
    13       <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" />
     13      <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRoles" Storage="_HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" />
    1414    </Type>
    1515  </Table>
     
    2020      <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="true" />
    2121      <Column Name="IsPermission" Type="System.Boolean" CanBeNull="false" />
    22       <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />
    23       <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" />
    24       <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" />
     22      <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRoleChilds" Storage="_HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" />
     23      <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabUserRoles" Storage="_HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />
     24      <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRoleParent" Storage="_HeuristicLabRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" />
    2525    </Type>
    2626  </Table>
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout

    r3951 r3962  
    2828      </nodes>
    2929    </associationConnector>
    30     <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     30    <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    3131      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabUserRole" />
    3232      <nodes>
  • branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs

    r3951 r3962  
    22//------------------------------------------------------------------------------
    33// <auto-generated>
    4 //     Dieser Code wurde von einem Tool generiert.
    5 //     Laufzeitversion:2.0.50727.4927
     4//     This code was generated by a tool.
     5//     Runtime Version:2.0.50727.4927
    66//
    7 //     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
    8 //     der Code erneut generiert wird.
     7//     Changes to this file may cause incorrect behavior and will be lost if
     8//     the code is regenerated.
    99// </auto-generated>
    1010//------------------------------------------------------------------------------
     
    251251   
    252252    [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabUserID")]
    253     public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole
     253    public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles
    254254    {
    255255      get
     
    310310    private bool _IsPermission;
    311311   
     312    private EntitySet<HeuristicLabRole> _HeuristicLabRole2;
     313   
    312314    private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole;
    313    
    314     private EntitySet<HeuristicLabRole> _HeuristicLabRole2;
    315315   
    316316    private EntityRef<HeuristicLabRole> _HeuristicLabRole1;
     
    330330    public HeuristicLabRole()
    331331    {
     332      this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2));
    332333      this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole));
    333       this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2));
    334334      this._HeuristicLabRole1 = default(EntityRef<HeuristicLabRole>);
    335335      OnCreated();
     
    405405    }
    406406   
     407    [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")]
     408    public EntitySet<HeuristicLabRole> HeuristicLabRoleChilds
     409    {
     410      get
     411      {
     412        return this._HeuristicLabRole2;
     413      }
     414      set
     415      {
     416        this._HeuristicLabRole2.Assign(value);
     417      }
     418    }
     419   
    407420    [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")]
    408     public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole
     421    public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles
    409422    {
    410423      get
     
    418431    }
    419432   
    420     [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")]
    421     public EntitySet<HeuristicLabRole> HeuristicLabRole2
    422     {
    423       get
    424       {
    425         return this._HeuristicLabRole2;
    426       }
    427       set
    428       {
    429         this._HeuristicLabRole2.Assign(value);
    430       }
    431     }
    432    
    433433    [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)]
    434     public HeuristicLabRole HeuristicLabRole1
     434    public HeuristicLabRole HeuristicLabRoleParent
    435435    {
    436436      get
     
    448448          {
    449449            this._HeuristicLabRole1.Entity = null;
    450             previousValue.HeuristicLabRole2.Remove(this);
     450            previousValue.HeuristicLabRoleChilds.Remove(this);
    451451          }
    452452          this._HeuristicLabRole1.Entity = value;
    453453          if ((value != null))
    454454          {
    455             value.HeuristicLabRole2.Add(this);
     455            value.HeuristicLabRoleChilds.Add(this);
    456456            this._parentRoleID = value.ID;
    457457          }
     
    460460            this._parentRoleID = default(Nullable<long>);
    461461          }
    462           this.SendPropertyChanged("HeuristicLabRole1");
     462          this.SendPropertyChanged("HeuristicLabRoleParent");
    463463        }
    464464      }
     
    483483        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    484484      }
     485    }
     486   
     487    private void attach_HeuristicLabRole2(HeuristicLabRole entity)
     488    {
     489      this.SendPropertyChanging();
     490      entity.HeuristicLabRoleParent = this;
     491    }
     492   
     493    private void detach_HeuristicLabRole2(HeuristicLabRole entity)
     494    {
     495      this.SendPropertyChanging();
     496      entity.HeuristicLabRoleParent = null;
    485497    }
    486498   
     
    495507      this.SendPropertyChanging();
    496508      entity.HeuristicLabRole = null;
    497     }
    498    
    499     private void attach_HeuristicLabRole2(HeuristicLabRole entity)
    500     {
    501       this.SendPropertyChanging();
    502       entity.HeuristicLabRole1 = this;
    503     }
    504    
    505     private void detach_HeuristicLabRole2(HeuristicLabRole entity)
    506     {
    507       this.SendPropertyChanging();
    508       entity.HeuristicLabRole1 = null;
    509509    }
    510510  }
     
    630630          {
    631631            this._HeuristicLabUser.Entity = null;
    632             previousValue.HeuristicLabUserRole.Remove(this);
     632            previousValue.HeuristicLabUserRoles.Remove(this);
    633633          }
    634634          this._HeuristicLabUser.Entity = value;
    635635          if ((value != null))
    636636          {
    637             value.HeuristicLabUserRole.Add(this);
     637            value.HeuristicLabUserRoles.Add(this);
    638638            this._HeuristicLabUserID = value.ID;
    639639          }
     
    664664          {
    665665            this._HeuristicLabAbstractRole.Entity = null;
    666             previousValue.HeuristicLabUserRole.Remove(this);
     666            previousValue.HeuristicLabUserRoles.Remove(this);
    667667          }
    668668          this._HeuristicLabAbstractRole.Entity = value;
    669669          if ((value != null))
    670670          {
    671             value.HeuristicLabUserRole.Add(this);
     671            value.HeuristicLabUserRoles.Add(this);
    672672            this._HeuristicLabRoleID = value.ID;
    673673          }
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs

    r3961 r3962  
    185185          // optionally delete related data
    186186          if (deleteAllRelatedData) {
    187             db.HeuristicLabUserRole.DeleteAllOnSubmit<HeuristicLabUserRole>(u.HeuristicLabUserRole);
     187            db.HeuristicLabUserRole.DeleteAllOnSubmit<HeuristicLabUserRole>(u.HeuristicLabUserRoles);
    188188          }
    189189
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs

    r3960 r3962  
    6161      if (roleName != null && db.HeuristicLabRole.Count(r => r.RoleName == roleName) == 1) {
    6262        HeuristicLabRole role = db.HeuristicLabRole.Single(r => r.RoleName == roleName);
    63         foreach (HeuristicLabUserRole userRole in role.HeuristicLabUserRole) {
     63        foreach (HeuristicLabUserRole userRole in role.HeuristicLabUserRoles) {
    6464          if (userRole.HeuristicLabUser.UserName.Contains(usernameToMatch)) {
    6565            returnValue.Add(userRole.HeuristicLabUser.UserName);
     
    8888
    8989        Persistence.HeuristicLabUser user = context.HeuristicLabUsers.Single(u => u.UserName == username);
    90         foreach (Persistence.HeuristicLabUserRole userRole in user.HeuristicLabUserRole) {
     90        foreach (Persistence.HeuristicLabUserRole userRole in user.HeuristicLabUserRoles) {
    9191          roleList.Add(userRole.HeuristicLabRole.RoleName);
    9292        }
Note: See TracChangeset for help on using the changeset viewer.