예제 #1
0
        /// <summary>
        /// Public constructor with required data.
        /// </summary>
        /// <param name="type"></param>
        /// <param name="_metadata0"></param>
        public PersonRole(Enums.PersonRoleType type, Metadata _metadata0)
        {
            // NOTE: This class has one-to-one associations with PersonRole.
            // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.

            this.Type = type;

            if (_metadata0 == null)
            {
                throw new ArgumentNullException(nameof(_metadata0));
            }
            _metadata0.PersonRoles.Add(this);

            this.Sources = new HashSet <MetadataProviderId>();

            Init();
        }
예제 #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="type"></param>
 /// <param name="_metadata0"></param>
 public static PersonRole Create(Enums.PersonRoleType type, Metadata _metadata0)
 {
     return(new PersonRole(type, _metadata0));
 }
예제 #3
0
 /// <summary>
 /// When provided in a partial class, allows value of Type to be changed before returning.
 /// </summary>
 partial void GetType(ref Enums.PersonRoleType result);
예제 #4
0
 /// <summary>
 /// When provided in a partial class, allows value of Type to be changed before setting.
 /// </summary>
 partial void SetType(Enums.PersonRoleType oldValue, ref Enums.PersonRoleType newValue);