LLBLGen Linq for getting a Scalar Value

Posts   
 
    
cmprogrock
User
Posts: 40
Joined: 16-Nov-2008
# Posted on: 04-Jul-2009 13:42:30   

Whats the best way to return a Scalar Value from LLBLGen / LINQ? (In this case - it is not a stored procedure.)

Basicly I want to grab an object [new PageEntity(28 )] and return a single property [p.PublicGUID] as a vvarchar (string).

Is there a better way than newing the whole object & grabing the the prop?

Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 05-Jul-2009 11:46:13   

cmprogrock wrote:

Whats the best way to return a Scalar Value from LLBLGen / LINQ? (In this case - it is not a stored procedure.)

Basicly I want to grab an object [new PageEntity(28 )] and return a single property [p.PublicGUID] as a vvarchar (string).

Is there a better way than newing the whole object & grabing the the prop?

Thanks

var v = from p in metaData.Page select p.PublicGuid.ToString();

It also helps if you post what you've already tried.

Frans Bouma | Lead developer LLBLGen Pro