using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Web.Security;
namespace TFC.Context
{
    public class DataContextInitializer : DropCreateDatabaseIfModelChanges<DataContext>
    {
        protected override void Seed(DataContext context)
        {
            WebSecurity.Register("admin", "123456", "demo@demo.com", true,"Miguel A.", "Gómez Álvarez");
            Roles.CreateRole("Admin");
            Roles.CreateRole("Trainer");
            Roles.CreateRole("Client");
            Roles.AddUserToRole("admin", "Admin");
            Roles.AddUserToRole("admin", "Trainer");

        }
    }
}