using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using LeafWeb.Core.Entities;

namespace LeafWeb.Core.DAL
{
	public class LeafWebContext : DbContext
	{
		public DbSet<LeafInput> LeafInputs { get; set; }
		public DbSet<LeafInputFile> LeafInputFiles { get; set; }
		public DbSet<LeafInputFileStatus> LeafInputStatus { get; set; }
		public DbSet<FluxnetSite> FluxnetSites { get; set; }
		public DbSet<PhotosynthesisType> PhotosynthesisTypes { get; set; }
		public DbSet<LeafOutputFile> LeafOutputFiles { get; set; }

		protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
			modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
			base.OnModelCreating(modelBuilder);
		}
	}
}
