コード例 #1
0
 private void SaveToDatabase(Alarm alarm)
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         repo.Add(_serviceId, alarm);
     }
 }
コード例 #2
0
 public void DeniedRemoval(string clientName)
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         repo.RemoveClientRequest(clientName);
     }
 }
コード例 #3
0
 private void AddForRemovalEvaluation(string clientName)
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         repo.AddClientRequest(clientName);
     }
 }
コード例 #4
0
 public List <string> GetClientRemovalRequests()
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         return(repo.GetAllClientRequests().ToList());
     }
 }
コード例 #5
0
 public void RemoveAllAlarms()
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         repo.DeleteAll();
     }
 }
コード例 #6
0
 public List <Alarm> GetAlarms()
 {
     using (var repo = AlarmRepositoryFactory.CreateNew(DefaultConnectionString))
     {
         return(repo.GetAllByServiceId(_serviceId).ToList());
     }
 }