bltoolkit query overriding

66 views
Skip to first unread message

Romeo

unread,
Mar 26, 2012, 2:42:55 AM3/26/12
to Business Logic Toolkit for .NET
Hi all!

Is it possible to override sql query result in bltoolkit?

i have associated query from database


var query = from u in db.User
select new
{
u.Id,
u.Login,
u.Password,
u.UserRole_Id,
u.UserRole
};

where

[TableName("is_users")]
public class User
{
[MapField("id"), PrimaryKey, Identity,
NonUpdatable]
public Guid Id;
[NotNull]
public string Name;
[NotNull]
public string Login;
[NotNull]
public string Password;

public Guid UserRole_Id;

[Association(ThisKey = "UserRole_Id", OtherKey = "Id",
CanBeNull = false)]
public UserRole UserRole;
}


and I want to get this result (with associations) by executing server
stored procedure.
But usually stored proc result is flat dataset without associations.

How I can override query resulting method?
Thanks.


hungl...@gmail.com

unread,
Oct 16, 2012, 7:24:10 AM10/16/12
to blto...@googlegroups.com
code nice
Reply all
Reply to author
Forward
0 new messages