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


            Init();
        }
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="entity1"></param>
 public static Entity2 Create(global::MultiContext.Context1.Entity1 entity1)
 {
     return(new Entity2(entity1));
 }
Пример #3
0
        /// <summary>
        /// Default constructor. Protected due to required properties, but present because EF needs it.
        /// </summary>
        protected Entity2()
        {
            Entity1 = new global::MultiContext.Context1.Entity1();

            Init();
        }