小编Pet*_*owe的帖子

VS2012 对于 ConnectionStrings 部分显示“不允许使用 configProtectionProvider 属性”

尽管此页面在标签中显示了该属性,但当我尝试对其进行编码时,我在线下看到了可怕的蓝色波浪线,并且悬停消息正如我在该问题的标题中放入的那样。我需要做什么才能激活此功能,因为 Microsoft 的页面清楚地显示了它是通过这种方式完成的。

谢谢,彼得

c# connection-string

4
推荐指数
1
解决办法
4612
查看次数

实体框架5代码首先无法使模型工作

在这个上再次撕掉我的头发...使用EF 5 Code First,在代码中构建模型 - 编译,所以它在语法上是正确的,但是当代码构建模型时我得到一个例外.这是实体类(我也有vaidation属性,但为了便于阅读,已将它们删除):

[Table("USERS")]
public class User : IPEntity
{
    #region Constructor (needs to initialize list objects for related entities)

    public User()
    {
        this.Profiles = new List<Profile>();
        this.ProfileDivs = new List<ProfileDiv>();
        this.ProfileDepts = new List<ProfileDept>();
    }

    #endregion

    #region Entity properties and validation attributes

    [Key]
    public long UserId { get; set; }

    public long PclientId { get; set; }

    public string UserName { get; set; }

    public string UserDescription { get; set; }

    public long? EmpId { get; …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework code-first

3
推荐指数
1
解决办法
3098
查看次数