Esempio n. 1
0
        internal CompanyTable(CompanyDatabase database) : base()
        {
            Database = database;

            Id         = AddColumn(nameof(Id), database.BuildColumn <long>(nameof(Company), nameof(Id), 99));
            JoinPolicy = AddColumn(nameof(JoinPolicy), database.BuildColumn <byte>(nameof(Company), nameof(JoinPolicy), (byte)SecurityPolicy.Open));
            Owner      = AddColumn(nameof(Owner), new RefColumn(nameof(CompanyDatabase.Employee)));
            Members    = AddColumn(nameof(Members), new RefListColumn(nameof(CompanyDatabase.Employee)));
            Teams      = AddColumn(nameof(Teams), new RefListColumn(nameof(CompanyDatabase.Team)));
        }
Esempio n. 2
0
        // </RefListColumnMember>
        // </ColumnMemberList>

        internal TeamTable(CompanyDatabase database) : base()
        {
            Database = database;

            // <ColumnConstructorList>

            // <SimpleColumnConstructor>
            Id = AddColumn(nameof(Id), database.BuildColumn <long>(nameof(Team), nameof(Id), 99));
            // </SimpleColumnConstructor>

            // <EnumColumnConstructor>
            JoinPolicy = AddColumn(nameof(JoinPolicy), database.BuildColumn <byte>(nameof(Team), nameof(JoinPolicy), (byte)SecurityPolicy.Open));
            // </EnumColumnConstructor>

            // <RefColumnConstructor>
            Owner = AddColumn(nameof(Owner), new RefColumn(nameof(CompanyDatabase.Employee)));
            // </RefColumnConstructor>

            // <RefListColumnConstructor>
            Members = AddColumn(nameof(Members), new RefListColumn(nameof(CompanyDatabase.Employee)));
            // </RefListColumnConstructor>

            // </ColumnConstructorList>
        }
Esempio n. 3
0
        internal EmployeeTable(CompanyDatabase database) : base()
        {
            Database = database;

            Name = AddColumn(nameof(Name), database.BuildColumn <string>(nameof(Employee), nameof(Name)));
        }
Esempio n. 4
0
 internal Team(CompanyDatabase database, Team other) : this(database.Team)
 {
     CopyFrom(other);
 }
Esempio n. 5
0
 internal static Team Copy(CompanyDatabase database, Team other)
 {
     return(other == null ? null : new Team(database, other));
 }
Esempio n. 6
0
        // </RefListColumnMember>
        // </ColumnMemberList>

        public TeamTable(IDatabase database, Dictionary <string, IColumn> columns = null) : base(database, columns)
        {
            Database = (CompanyDatabase)database;
            GetOrBuildColumns();
        }
Esempio n. 7
0
 internal EmployeeTable(IDatabase database) : base()
 {
     Database = (CompanyDatabase)database;
     GetOrBuildColumns();
 }