我有一个这样的课:
public class AuthEntity
{
public int Id { get; set; }
public AuthResource Resource { get; set; }
public int ActionId { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
AuthResource在哪里:
public class AuthResource
{
public long ResourceId { get; private set; }
public int ResourceType { get; private set; }
}
Run Code Online (Sandbox Code Playgroud)
存储数据的表具有以下字段:
我可以很好地阅读AuthEntity(包括Resource属性),但我不知道如何插入AuthEntity记录.NPoco说没有资源字段.如何将嵌套对象字段映射到表字段?
谢谢