This project is read-only.

LinqExtender 1.5

Rating: No reviews yet
Downloads: 555
Released: Jan 1, 2009
Updated: Feb 22, 2009 by mehfuzh
Dev status: Beta Help Icon

Recommended Download

Source Code Source.zip
source code, 435K, uploaded Jan 11, 2009 - 199 downloads

Other Available Downloads

Application Development-Pack.zip
application, 51K, uploaded Jan 11, 2009 - 162 downloads
Documentation Getting Started.doc
documentation, 74K, uploaded Jan 11, 2009 - 194 downloads

Release Notes

This release contains major updates over 1.4 . This release removes the dependencies for QueryObjectBase class by which it is now possible to covert existing data objects to support LINQ using LinqExtender.

To enable LINQ over a existing or new data object do the following

Implement IQueryObject interface (blank)

publc class  Twit : IQueryObject
{
    // you property goes here
}



Make one property as Unique that will be used for tracking Add, UPdate.

// Inside your IQueryOBject implementation
[UniqueIdentifier]
public string Id {get;set;}



Ignore properties which need not to be processed by LinqExtender

[Ignore]
public string  LastUpdated 
{
    get
    {
        return user.Lasupdated;
    }
}



Finally, create the query provider

   public class TwitterContext : Query<Twit>
   {
        /// override necessary methods , see documnetation.
   }



Parenthesis grouping and multiple operator support in expression

Let's consider the following code
where (book.Author == "Paolo Pialorsi" || book.ISBN == "100-11-777") && book.Id == books[2].Id


Query translation and terminology

Group 1: book.Author == "Paolo Pialorsi" || book.ISBN == "100-11-777"
Group 2: book.Id == books[2].Id.
Inside Bucket
  • RelationWithPreviousGroup = AND, for first group it is None.
  • HasMoreThanTwoQueryItems = true ( you can put “(“ , “)” if you are generating SQL query)
Inside Bucket Item
  • ReleationWithPreviousItem = OR for group 1

Code snippet inside Query<T>.Process overridden method
foreach (var groupIndex in bucket.QueriedItems.Keys)
{
     // AND OR , None, for first item it is None 
     ExpressionRealation rel = bucket.RelationWithPreviousGroup;

     If (bucket.HasMoreThanTwoQueryItems)
     {
	// do something useful, like append parenthesis
     }

     foreach(BucketItem item in  bucket.QuriedItems[groupIndex])
     {
        // AND OR , None, for first item it is None
        ExpressionRelation itemRel = item.RelationWithPreviousItem; 
        
       
       string name = item.Name; 
       // do whatever necessary, but properties are
    	obj value = item.Value; 
       // GREATER, LESS, etc…
       RelationType relationType = item.RelationType     
    }
    
     If (bucket.HasMoreThanTwoQueryItems)
     {
	// do something useful, like append parenthesis
     }
}

Reviews for this release

No reviews yet for this release.