sockscape/server/DAL/ScapeDb.cs

29 lines
798 B
C#
Raw Normal View History

2017-07-22 19:27:41 +00:00
namespace SockScape.DAL {
2017-06-05 12:20:39 +00:00
using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
public partial class ScapeDb : DbContext {
static ScapeDb() {
2017-06-05 12:20:39 +00:00
DbConfiguration.SetConfiguration(new MySql.Data.Entity.MySqlEFConfiguration());
}
2017-06-05 12:20:39 +00:00
public ScapeDb()
: base("name=ScapeDbDebug")
{
}
2017-06-05 12:20:39 +00:00
public DbSet<User> Users { get; set; }
public DbSet<Origin> Origins { get; set; }
2017-06-06 21:13:25 +00:00
public DbSet<Session> Sessions { get; set; }
2017-06-05 12:20:39 +00:00
protected override void OnModelCreating(DbModelBuilder modelBuilder) {
base.OnModelCreating(modelBuilder);
}
}
}