/// <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(); }
/// <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)); }
/// <summary> /// When provided in a partial class, allows value of Type to be changed before returning. /// </summary> partial void GetType(ref Enums.PersonRoleType result);
/// <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);