using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Models
{
    public class DatabaseContex : System.Data.Entity.DbContext
    {
        static DatabaseContex()
        {
            System.Data.Entity.Database.SetInitializer(new DatabaseContextInitializer());

            //migrations
            //System.Data.Entity.Database.SetInitializer
            //    (new System.Data.Entity.MigrateDatabaseToLatestVersion<DatabaseContex,
            //        MyCMS.Migrations.Configuration>());
        }

        public DatabaseContex()
        {

        }

        protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new User.Configuration());


            base.OnModelCreating(modelBuilder);
        }



        public System.Data.Entity.DbSet<User> Users { get; set; }
    }
}