Exemple #1
0
 public UnitOfWork(ISTSpacePlanningContext dbContext = null)
 {
     _dbContext                     = dbContext ?? new ISTSpacePlanningContext();
     _addressRepository             = new Repository <Address>(_dbContext);
     _auditLogRepository            = new Repository <AuditLog>(_dbContext);
     _elementRepository             = new Repository <Element>(_dbContext);
     _elementypeRepository          = new Repository <ElementType>(_dbContext);
     _elemenUserRepository          = new Repository <ElementUser>(_dbContext);
     _entityRepository              = new Repository <Entity>(_dbContext);
     _entityAddressRepository       = new Repository <EntityAddress>(_dbContext);
     _entityNameRepository          = new Repository <EntityName>(_dbContext);
     _entityTypeRepository          = new Repository <EntityType>(_dbContext);
     _entityUserRepository          = new Repository <EntityUser>(_dbContext);
     _graphicRepository             = new Repository <Graphic>(_dbContext);
     _graphicTypeRepository         = new Repository <GraphicType>(_dbContext);
     _layerRepository               = new Repository <Layer>(_dbContext);
     _layerTypeRepository           = new Repository <LayerType>(_dbContext);
     _lockRepository                = new Repository <Lock>(_dbContext);
     _lockUserRepository            = new Repository <LockUser>(_dbContext);
     _logLevelRepository            = new LogLevelRepository(_dbContext);
     _nameRepository                = new Repository <Name>(_dbContext);
     _objectRepository              = new Repository <Object>(_dbContext);
     _objectPermissionRepository    = new Repository <ObjectPermission>(_dbContext);
     _operationRepository           = new Repository <Operation>(_dbContext);
     _operationPermissionRepository = new Repository <OperationPermission>(_dbContext);
     _permissionRepository          = new Repository <Permission>(_dbContext);
     _physicalElementRepository     = new Repository <PhysicalElement>(_dbContext);
     _planRepository                = new Repository <Plan>(_dbContext);
     _planUserRepository            = new Repository <PlanUser>(_dbContext);
     _preferenceRepository          = new Repository <Preference>(_dbContext);
     _preferenceUserRepository      = new Repository <PreferenceUser>(_dbContext);
     _roleRepository                = new Repository <Role>(_dbContext);
     _rolePermissionRepository      = new Repository <RolePermission>(_dbContext);
     _sceneRepository               = new Repository <Scene>(_dbContext);
     _sceneTypeRepository           = new Repository <SceneType>(_dbContext);
     _userRepository                = new Repository <User>(_dbContext);
     _userRoleRepository            = new Repository <UserRole>(_dbContext);
 }
Exemple #2
0
 public Repository(ISTSpacePlanningContext dbContext)
 {
     _dbContext = dbContext;
     _dbSet     = _dbContext.Set <TEntity>();
 }