private void OnGroupNameChanged( object sender, ValueChangedEventArgs e ) { var sector = sender as Sector; if ( sector == null ) { return; } if ( e.OldValue == TomViewModel.UNDEFINED_ENTITY_NAME ) { return; } var alias = new SectorAlias(); alias.Name = e.OldValue; alias.Sector = sector; myTom.SectorAliases.Add( alias ); }
/// <summary> /// Deprecated Method for adding a new object to the SectorAliases EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSectorAliases(SectorAlias sectorAlias) { base.AddObject("SectorAliases", sectorAlias); }
/// <summary> /// Create a new SectorAlias object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="name">Initial value of the Name property.</param> public static SectorAlias CreateSectorAlias(global::System.Int64 id, global::System.String name) { SectorAlias sectorAlias = new SectorAlias(); sectorAlias.Id = id; sectorAlias.Name = name; return sectorAlias; }