Update: SignalR 2.0.3 Migration; Noticeboards
Migrate all SignalR 1.x Persistent Connections to SignalR 2.x Hubs. Abstracts ScheduledTaskStatus with core interface and adds a Mock for optional status reporting. Noticeboards rewritten (with new theme) to be more resilient and accurate.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
|
||||
namespace Disco.Services.Logging.Persistance
|
||||
{
|
||||
public class LogPersistContext : DbContext
|
||||
{
|
||||
public LogPersistContext(string ConnectionString) : base(ConnectionString) { }
|
||||
|
||||
static LogPersistContext()
|
||||
{
|
||||
Database.SetInitializer<LogPersistContext>(new LogPersistContextInitializer());
|
||||
}
|
||||
|
||||
public DbSet<Models.LogModule> Modules { get; set; }
|
||||
public DbSet<Models.LogEventType> EventTypes { get; set; }
|
||||
public DbSet<Models.LogEvent> Events { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Services.Logging.Persistance
|
||||
{
|
||||
public class LogPersistContextInitializer : IDatabaseInitializer<LogPersistContext>
|
||||
{
|
||||
public void InitializeDatabase(LogPersistContext context)
|
||||
{
|
||||
if (!context.Database.Exists())
|
||||
{
|
||||
context.Database.Create();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user