/// <summary> /// Public constructor with required data /// </summary> /// <param name="bparentrequired"></param> /// <param name="bparentrequired_1"></param> /// <param name="bparentrequired_2"></param> public BChild(global::Testing.BParentRequired bparentrequired, global::Testing.BParentRequired bparentrequired_1, global::Testing.BParentRequired bparentrequired_2) { if (bparentrequired == null) { throw new ArgumentNullException(nameof(bparentrequired)); } this.BParentRequired = bparentrequired; if (bparentrequired_1 == null) { throw new ArgumentNullException(nameof(bparentrequired_1)); } this.BParentRequired_1 = bparentrequired_1; if (bparentrequired_2 == null) { throw new ArgumentNullException(nameof(bparentrequired_2)); } this.BParentRequired_2 = bparentrequired_2; this.BParentCollection = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); this.BParentCollection_1 = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); this.BParentCollection_2 = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); Init(); }
/// <summary> /// Default constructor. Protected due to required properties, but present because EF needs it. /// </summary> protected BChild() { // NOTE: This class has one-to-one associations with BChild. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other. BParentCollection = new System.Collections.Generic.HashSet <global::Testing.BParentCollection>(); BParentCollection_2 = new System.Collections.Generic.HashSet <global::Testing.BParentCollection>(); BParentRequired = new global::Testing.BParentRequired(); BParentRequired_1 = new global::Testing.BParentRequired(); BParentRequired_2 = new global::Testing.BParentRequired(); Init(); }
/// <summary> /// Public constructor with required data /// </summary> /// <param name="bparentrequired"></param> /// <param name="bparentrequired_2"></param> public BChild(global::Testing.BParentRequired bparentrequired, global::Testing.BParentRequired bparentrequired_2) { // NOTE: This class has one-to-one associations with BChild. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other. if (bparentrequired == null) { throw new ArgumentNullException(nameof(bparentrequired)); } this.BParentRequired = bparentrequired; if (bparentrequired_2 == null) { throw new ArgumentNullException(nameof(bparentrequired_2)); } this.BParentRequired_2 = bparentrequired_2; this.BParentCollection = new System.Collections.Generic.HashSet <global::Testing.BParentCollection>(); this.BParentCollection_2 = new System.Collections.Generic.HashSet <global::Testing.BParentCollection>(); Init(); }
/// <summary> /// Public constructor with required data /// </summary> /// <param name="bparentrequired"></param> /// <param name="bparentrequired_2"></param> public BChild(global::Testing.BParentRequired bparentrequired, global::Testing.BParentRequired bparentrequired_2) { // NOTE: This class has one-to-one associations with BChild. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other. if (bparentrequired == null) { throw new ArgumentNullException(nameof(bparentrequired)); } this.BParentRequired = bparentrequired; bparentrequired.BChildOptional = this; if (bparentrequired_2 == null) { throw new ArgumentNullException(nameof(bparentrequired_2)); } this.BParentRequired_2 = bparentrequired_2; bparentrequired_2.BChildCollection.Add(this); this.BParentCollection = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); this.BParentCollection_1 = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); this.BParentCollection_2 = new System.Collections.ObjectModel.ObservableCollection <global::Testing.BParentCollection>(); Init(); }
/// <summary> /// Static create function (for use in LINQ queries, etc.) /// </summary> /// <param name="bparentrequired"></param> /// <param name="bparentrequired_2"></param> public static BChild Create(global::Testing.BParentRequired bparentrequired, global::Testing.BParentRequired bparentrequired_2) { return(new BChild(bparentrequired, bparentrequired_2)); }
partial void GetBParentRequired_2(ref global::Testing.BParentRequired result);
partial void SetBParentRequired_2(global::Testing.BParentRequired oldValue, ref global::Testing.BParentRequired newValue);