public IList<StatusItem> ReportStatus() { var statusItem = new StatusItem("__NAME__.Domain.Persistence"); var repo = new MigrationsRepository(_unitOfWork); //Try sending a messages try { statusItem.Comment = $"Last migration {repo.LastMigration}"; statusItem.Status = StatusItem.OK; } catch (Exception e) { statusItem.Status = StatusItem.Error; statusItem.Comment = e.Message; } return new[] { statusItem }; }
public IList <StatusItem> ReportStatus() { var statusItem = new StatusItem("__NAME__.Domain.Persistence"); var repo = new MigrationsRepository(_unitOfWork); //Try sending a messages try { statusItem.Comment = $"Last migration {repo.LastMigration}"; statusItem.Status = StatusItem.OK; } catch (Exception e) { statusItem.Status = StatusItem.Error; statusItem.Comment = e.Message; } return(new[] { statusItem }); }
public PersistenceStatusReporter(MigrationsRepository repo) { _repo = repo; }