public CheckInRoom() { dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>(); dbCrud = BLL.ServiceModules.IoC.Get <IDbCrud>(); completeCheckIn = IoC.Get <ICompleteCheckIn>(); Clear(); }
public Migration(IFileSystem fileSystem) { _fileSystem = fileSystem; _dbContextInfo = new DbContextInfo(); _dbInfo = new DbInfo(); _table = new Table(); }
/// <summary> /// Creates an instance of Database. /// </summary> /// <param name="dbInfo"></param> public Database(IDbInfo dbInfo) { if (dbInfo == null) { throw new ArgumentNullException("dbInfo"); } DbInfo = dbInfo; }
public CompleteCheckIn() { checkInService = BLL.ServiceModules.IoC.Get <ICheckInService>(); dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>(); dbCrud = BLL.ServiceModules.IoC.Get <IDbCrud>(); checkIn = new CheckInModel(); guests = new List <GuestModel>(); services = new List <ServiceData>(); guestDocuments = new List <GuestDocuments>(); }
public EmployeeProperties() { dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>(); checkInService = BLL.ServiceModules.IoC.Get <ICheckInService>(); completeCheckIn = IoC.Get <ICompleteCheckIn>(); checkInRoom = IoC.Get <ICheckInRoom>(); checkInGuest = IoC.Get <ICheckInGuest>(); Periods = new List <Period>(); Periods.Add(new Period(0, "Текущие заселения")); Periods.Add(new Period(1, "Предстоящие заселения")); Periods.Add(new Period(-1, "Прошедшие заселения")); CurrentPeriodIndex = 0; }
public void Remove_AllPathExist_PathDeleted( [Frozen] IDbInfo dbInfo, Migration sut) { var fileSystem = new MockFileSystem(new Dictionary <string, MockFileData> { { @"C:\temp", new MockFileData("Test") }, { @"C:\temp\Migrations", new MockFileData("Test") }, }); _ = dbInfo.Parse("test").Returns(new DbInfo()); Action act = () => sut.Remove(@"C:\temp", @"C:\temp\Migrations"); fileSystem.Directory.Exists(@"C:\temp\Migrations").Should().BeFalse(); }
public void Remove(string projectPath, string migrationsPath) { if (!_fileSystem.Directory.Exists(projectPath)) { throw new DirectoryNotFoundException(nameof(projectPath)); } _dbInfo = _dbInfo.Parse(_dbContextInfo.GetInfo(projectPath)); _table.Drop($"Data Source={Path.Combine(projectPath, _dbInfo.DataSource)}"); if (!_fileSystem.Directory.Exists(migrationsPath)) { throw new DirectoryNotFoundException(nameof(migrationsPath)); } _fileSystem.Directory.Delete(migrationsPath, true); }
public CheckInGuest() { completeCheckIn = IoC.Get <ICompleteCheckIn>(); dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>(); Clear(); }
public UserController(IUserDb userDb, IDbInfo dbInfo) { _userDb = userDb; _dbInfo = dbInfo; }
public DbService(IDbInfo dbInfo) { _dbInfo = dbInfo; }
public Director() { Clear(); dbInfo = BLL.ServiceModules.IoC.Get <IDbInfo>(); }