예제 #1
0
        public static Entity AddEntity <TEntity>()
        {
            var entity = new Entity(typeof(TEntity));

            EntitiesTypes.Add(entity);

            return(entity);
        }
예제 #2
0
        public void AddType <T>() where T : IDbEntity
        {
            Type type = typeof(T);

            if (EntitiesTypes.Contains(type))
            {
                return;
            }

            EntitiesTypes.Add(type);

            IndexTracker.Add(type, 0);

            HashSet <IDbEntity> hashset = new HashSet <IDbEntity>(new DbEntityComparer <IDbEntity>());

            Database.Add(type, hashset);
        }