Exemple #1
0
        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);
        }
Exemple #2
0
 public ProcessedMessagesForm(AppRepository repository, BindingList <MeterReadingMessage> meterReadingMessages) : this()
 {
     _repository           = repository;
     _meterReadingMessages = meterReadingMessages;
 }