Files
Disco/Disco.Services/Logging/Targets/LogPersistContext.cs
T
2013-05-15 16:19:04 +10:00

24 lines
684 B
C#

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.Targets
{
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; }
}
}