我在包管理器控制台中更新数据库时出现错误,这是我的配置类和Web配置尚未启用角色管理器功能.请帮我
我的配置类
namespace TechFactorsLMSV2.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Web.Security;
using TechFactorsLMSV2.Models;
using WebMatrix.WebData;
internal sealed class Configuration : DbMigrationsConfiguration<TechFactorsLMSV2.Models.LMSDBContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
}
protected override void Seed(TechFactorsLMSV2.Models.LMSDBContext context)
{
context.Schools.AddOrUpdate(d => d.SchoolName,
new School() { SchoolName = "School 1" },
new School() { SchoolName = "School 2" },
new School() { SchoolName = "School 3" }
);
SeedMembership();
}
private void SeedMembership()
{
WebSecurity.InitializeDatabaseConnection("DefaultConnection",
"UserProfile", "UserId", "UserName", autoCreateTables: true);
var …Run Code Online (Sandbox Code Playgroud)