嗨,我有以下实体类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace myspace
{
class aList
{
public int Id { get; set; }
[Index("atIdIndex", IsUnique=true)]
public int atId { get; set; }
public string description { get; set; }
}
}在visual studio on Index("atIdIndex",IsUnique=true)中,我在索引下看到一条红线,显示类型或名称空间索引找不到。请让我知道如何解决它,谢谢‘
发布于 2014-10-10 19:12:19
您需要添加:
using System.ComponentModel.DataAnnotations.Schema;发布于 2014-10-11 01:35:11
不得不重新安装EF,在那之后它工作得很好。谢谢
https://stackoverflow.com/questions/26297563
复制相似问题