开发者

Subsonic Linq guid problem

开发者 https://www.devze.com 2022-12-10 19:27 出处:网络
The construtor \'Void .ctor(System.Guid, Int32)\' is not supported. this error occured with the following statements:
 The construtor 'Void .ctor(System.Guid, Int32)' is not supported.

this error occured with the following statements:

var Test = from r in db.UserRoles
  join p in db.UserPermissions
    on new { r.userId,开发者_StackOverflow中文版 r.roleId} equals new { p.userId, p.roleId }
  select r;

userId is a guid roleId is an integer


Right - the constructor for UserRoles looks like it needs a Guid and int - something you're not supplying explicitly. SubSonic has no way of figuring this out for you - one of the many reasons I keep telling people to abstract the membership stuff behind an interface and don't try to use SubSonic to get to it - you're circumventing most of their magic.

0

精彩评论

暂无评论...
验证码 换一张
取 消