当我将bool映射到带有Entity Framework的SQL Server时,如何定义SQL Server数据类型?

Ala*_*an2 4 sql-server entity-framework sql-server-2008

我在C#类中有以下内容.

    public bool answer1Correct { get; set; }
    public bool answer2Correct { get; set; }
    public bool answer3Correct { get; set; }
    public bool answer4Correct { get; set; }
    public bool answer5Correct { get; set; }
Run Code Online (Sandbox Code Playgroud)

我想使用Entity Framework将它们连接到SQL Server中的表.在SQL Server 2012中创建列时,我应该使用什么数据类型?

Tin*_*fax 9

使用数据类型BIT ...实体框架将正确映射它