を働いていない、私は多くの役割nPoco V3 - 多くの多くは
public class User
{
public int Id {get;set;}
public string Name {get;set;}
public List<Role> Roles {get;set;}
}
public class Roles
{
public int Id {get;set;}
public string Key{get;set;}
}
public class UserRoles
{
public int UserId {get;set;}
public int RoleId {get;set;}
}
を持つユーザーを持っているもの、私が達成しようとすることは、1つのクエリ内のすべての役割を持つユーザーを取得し、これまでのところ、私は失敗しています。私はカスタムConventionbasedマッパーを使用してマッピングするための
を(私は、コードを提供することができますが、それはかなり大きいです)私はFetchOneToManyを試してみましたが、ここではhttps://github.com/schotime/NPoco/wiki/One-to-Many-Query-Helpers https://github.com/schotime/NPoco/wiki/Version-3
を説明した。しかし役割が常にあるように私は取得しようとしました空の。それ自体で 役割とユーザーが正しくマップされていると私は再びそれは役割が空で、助けにはならなかった
For<User>().Columns(x =>
{
x.Many(c => c.Roles);
x.Column(c => c.Roles).ComplexMapping();
}, true);
のような関係を指定しようとしました。
私は何が欠けているのか分かりません。 アイデア