示例#1
0
        /// <summary>
        /// Creates a new container (which starts out as an oprhan) with the given <see cref="SetOperation"/>.  You should either set a
        ///  <see cref="CohortIdentificationConfiguration.RootCohortAggregateContainer_ID"/> to this.<see cref="IMapsDirectlyToDatabaseTable.ID"/> to make this container the root container
        /// or use <see cref="AddChild(CohortAggregateContainer)"/>  on another container to make this a subcontainer of it.
        /// </summary>
        /// <param name="repository"></param>
        /// <param name="operation"></param>
        public CohortAggregateContainer(ICatalogueRepository repository, SetOperation operation)
        {
            repository.InsertAndHydrate(this, new Dictionary <string, object>
            {
                { "Operation", operation.ToString() },
                { "Order", 0 },
                { "Name", operation.ToString() }
            });

            _manager = repository.CohortContainerManager;
        }
示例#2
0
        internal CohortAggregateContainer(ICatalogueRepository repository, DbDataReader r)
            : base(repository, r)
        {
            Order = int.Parse(r["Order"].ToString());
            SetOperation op;

            SetOperation.TryParse(r["Operation"].ToString(), out op);
            Operation  = op;
            Name       = r["Name"].ToString();
            IsDisabled = Convert.ToBoolean(r["IsDisabled"]);

            _manager = repository.CohortContainerManager;
        }