public static Entity AddEntity <TEntity>() { var entity = new Entity(typeof(TEntity)); EntitiesTypes.Add(entity); return(entity); }
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); }