Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Select form an entity with Queryspec
 

Pages: 1
LLBLGen Pro Runtime Framework
Select form an entity with Queryspec
Page:1/1 

  Print all messages in this thread  
Poster Message
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 15-Mar-2015 20:48:36.  
Here is my query so far. I'm getting exceptions about missing columns and a lack of projections.

Code:
            var qf = new QueryFactory();

            var query = qf.Create()
                .From(qf.VwWeekenderChaletAllocationOrder
                    .Where(VwWeekenderChaletAllocationOrderFields.EventId == eventId)
                    .AndWhere(VwWeekenderChaletAllocationOrderFields.ForSale == true)
                    .AndWhere(VwWeekenderChaletAllocationOrderFields.Berth == berth)
                    .AndWhere(VwWeekenderChaletAllocationOrderFields.ChaletInstanceId != assignedParkChaletIds.ToArray()))
                .Where(VwWeekenderChaletAllocationOrderFields.FloorBlockCount == quantity)
                .OrderBy(VwWeekenderChaletAllocationOrderFields.ChaletClassId.Ascending(),
                    VwWeekenderChaletAllocationOrderFields.Block.Ascending(),
                    VwWeekenderChaletAllocationOrderFields.Floor.Descending(),
                    VwWeekenderChaletAllocationOrderFields.ParkChaletId.Ascending())
                .Limit(quantity)
                .WithProjector(r => new VwWeekenderChaletAllocationOrderEntity
                {
                });

            var collection = new DataAccessAdapter().FetchQuery(query);


The gist of it is that I have an entity that I need to filter and then I need to filter the result and order it and end up with a list of the original entity.

How can I do this? Cool
  Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 15-Mar-2015 22:10:51.  
I can't put all the where clauses on the inner query because the FloorBlockCount field is the result of an OVER clause.

  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8109 posts
# Posted on: 16-Mar-2015 08:05:25.  
Ian wrote:
I can't put all the where clauses on the inner query because the FloorBlockCount field is the result of an OVER clause.

How did you do that? Please show the code of that.
David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.