public TestDatabaseService(IDatabase database, IDatabaseTable <TestEnum, ITestDomain, TestEntity> testDatabaseTable, ITestDatabaseValidateService testDatabaseValidateService, IEntityConverter <TestEnum, ITestDomain, TestEntity> testEntityConverter) : base(database, testDatabaseTable, testDatabaseValidateService, testEntityConverter) { }
protected DatabaseService(IDatabase database, IDatabaseTable <TId, TDomain, TEntityOut> dataTable, IDatabaseValidateService <TId, TDomain> databaseValidateService, IEntityConverter <TId, TDomain, TEntityOut> mainEntityConverter) { _database = database; _dataTable = dataTable; _databaseValidateService = databaseValidateService; _mainEntityConverter = mainEntityConverter; }
/// <summary> /// Добавить модели в базу и сохранить /// </summary> private async Task <IResultCollection <TId> > AddRangeWithSaving(IDatabaseTable <TId, TDomain, TEntityOut> dataTable, IEnumerable <TDomain> models) => await dataTable.AddRangeAsync(_mainEntityConverter.ToEntities(models)). ResultCollectionBindErrorsOkBindAsync(_ => DatabaseSaveChanges());
public DatabaseTableSelected(IDatabaseTable databaseTable) { DatabaseTable = databaseTable; }
public PlantRepository(IDatabaseTable <PlantRecord> plantTable) { this.plantTable = plantTable; }
protected DatabaseValidateService(IDatabaseTable <TId, TDomain, TEntity> dataTable) { _dataTable = dataTable; }
public UserRepository(IDatabaseTable <UserRecord> userTable) { this.userTable = userTable; }
public DatabaseTableCreated(IDatabaseTable databaseTable) { DatabaseTable = databaseTable; }