/// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="entity2"></param>
        public Entity1(global::Testing.Entity2 entity2)
        {
            if (entity2 == null)
            {
                throw new ArgumentNullException(nameof(entity2));
            }
            this.Entity2 = entity2;

            this.Entity11  = new System.Collections.Generic.HashSet <global::Testing.Entity11>();
            this.Entity2_1 = new System.Collections.Generic.HashSet <global::Testing.Entity2>();

            Init();
        }
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="entity2"></param>
 public static Entity1 Create(global::Testing.Entity2 entity2)
 {
     return(new Entity1(entity2));
 }