22 lines
427 B
C#
22 lines
427 B
C#
using System.Data.Entity;
|
|
using DAL.Domain;
|
|
|
|
namespace DAL
|
|
{
|
|
public class FoorumDbContext : DbContext, Interfaces.IFoorumDbContext
|
|
{
|
|
public DbSet<Foorum> Foorums { get; set; }
|
|
public DbSet<Post> Posts { get; set; }
|
|
|
|
|
|
|
|
public FoorumDbContext() : base("name=FoorumDb")
|
|
{
|
|
Database.SetInitializer(
|
|
new Helpers.DbInitializer()
|
|
);
|
|
}
|
|
|
|
}
|
|
}
|