1
如果我有一個像實體框架查詢的多標籤雲相關的帖子
[Table("MTag")]
public class Tag
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int TagId { get; set; }
public string TagLabel { get; set; }
public virtual ICollection<TagRef> RefTags { get; set; }
}
[Table("TagRef")]
public class TagRef
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int TagRefId { get; set; }
public virtual Tag Tag { get; set; }
public virtual ICollection<Post> Posts { get; set; }
}
[Table("Post")]
public class Post
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int PostId { get; set; }
public UserProfile User { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string PostGuid { get; set; }
public string Make { get; set; }
public string Model { get; set; }
public virtual ICollection<MTagRef> Tags { get; set; }
public string ImageFileName { get; set; }
public int Price { get; set; }
public int ImageWidth { get; set; }
public int ImageHeight { get; set; }
}
什麼是可能的查詢選擇所有匹配的崗位模型類?你能給我一個提示,如果我有像Car,Mobile這樣的標籤如何設置查詢嗎?
能不能請您詳細說明更多*選擇所有匹配的職位*?這裏的匹配是基於哪些條件? –
匹配到什麼? –
我想選擇所有與車輛或電子設備相匹配的標籤。 –