2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
namespace ArticleLibrary_.NET.Models
{
public class ArticleLibraryEntitiy : DbContext
{
public DbSet<Post> Posts { get; set; }
public DbSet<Person> People { get; set; }
public DbSet<Tag> Tags { get; set; }
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
}
}
給出了一個錯誤說:
Expected class, delegate, enum, interface, or struct
符合
protected override void OnModelCreating(ModelBuilder modelBuilder)
,也似乎ModelBuilder
不受VS代碼編輯器的認可
我是否需要添加其他參考?
mnmnm對不起,我的愚蠢... :( – Nalaka526 2012-04-03 08:51:16
我們都是人類......請投票給我的答案。謝謝 – 2012-04-03 08:57:34