0
我有类这样的定义:映射嵌套类
public class WebSiteContent
{
public Guid Id { get; set; }
public About About { get; set; }
public Tips Tips { get; set; }
public Images Images { get; set; }
}
在我的公司和提示和图像看起来就像这样:
public class About
{
public Guid Id { get; set; }
public string Text { get; set; }
public string Addres { get; set; }
public int PhoneNumber { get; set; }
public int Mobile { get; set; }
}
和温馨提示:
public class Tips
{
public Guid Guid { get; set; }
public string Content { get; set; }
}
和图片:
public class Images
{
public Guid Id { get; set; }
public string Background { get; set; }
public string Logo { get; set; }
public About About { get; set; }
}
这里我只是想使用关于和图像和技巧作为助手类来创建一个属性,并不想有关于数据库中的图像或提示表!
实体框架需要Id来映射上述所有类,我该怎么做?