private void SetupDb() { var connectionStr = ConfigurationManager.ConnectionStrings["ReadingsDB"].ConnectionString; _appEntitiesRepo = new AppRepository(connectionStr); var sendersCollections = _appEntitiesRepo.Database.GetCollection <SenderFlat>(); sendersCollections.EnsureIndex(x => x.Sender); var mrCollection = _appEntitiesRepo.Database.GetCollection <MeterReadingMessage>(); mrCollection.EnsureIndex(x => x.SenderAddress); }
public ProcessedMessagesForm(AppRepository repository, BindingList <MeterReadingMessage> meterReadingMessages) : this() { _repository = repository; _meterReadingMessages = meterReadingMessages; }