开发者

How to load only certain columns using fluentnhibernate?

开发者 https://www.devze.com 2022-12-25 01:21 出处:网络
I want to know how can i fill only certain columns while filling the entity object? i am interested in certain properties of the entity and not all.

I want to know how can i fill only certain columns while filling the entity object?

i am interested in certain properties of the entity and not all.

but when i use session to fetch the entity it sends query like "select * from Customer" for example.

but i want to do "Select customerName from Customer".

I think it has some thing to do with LazyLoad() but i am not sure how exactly.

Any help will be highly appriciated.

Th开发者_Python百科anks in Advance, Ashish


var defs = session.CreateCriteria(typeof(test));
defs.SetProjection(Projections.ProjectionList()
    .Add(Projections.Property("FirstColumn"));
0

精彩评论

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