我的域类上有一个虚拟的 ICollection 属性。如果我离开该属性,则在查询后由微风生成的项目没有 entityaspect 属性。如果我删除虚拟,一切正常。
例子:
这是一个产品 Poco:
public class Product : BaseEntity
{
[Required]
public string Name { get; set; }
public decimal Price { get; set; }
public string Description { get; set; }
// if i leave the property like this, everything works fine.
public ICollection<Category> Categories { get; set; }
//if i do something like this, the entities are loaded by breeze,
but they got no entity aspect property
public virtual ICollection<Category> Categories { get; set; }
}