Adding EF initialization
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.ModelConfiguration.Conventions;
|
||||
using LeafWeb.Core.Models;
|
||||
|
||||
namespace LeafWeb.Core.DAL
|
||||
{
|
||||
public class LeafWebContext : DbContext
|
||||
{
|
||||
public DbSet<LeafInput> LeafInputs { get; set; }
|
||||
public DbSet<LeafInputFile> LeafInputFiles { get; set; }
|
||||
public DbSet<FluxnetSite> FluxnetSites { get; set; }
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user