Synergi LINQ Provider Prototype

  • .NET/Synergi/LINQ/C#
  • Published: 2014-09-03 04:17:49 +00:00

The last two weeks I have been working on a LINQ provider for Synergi. LINQ is a very nice and useful mechanism for extracting data from any type of data store. When creating a LINQ provider there are some hurdles to overcome. Once you get an understanding of IQueryProvider, IOrderedQueryable<T> and the ExpressionVisitor abstract class, things begin to fall into place.

The following example shows two queries. They both produce the same result, but the last one specifies the entire query using numbers, while the first one uses text representation. When using text representation the text is converted to a number before the search is performed.

SynergiQueryContext ctx = new SynergiQueryContext(ConfigurationInformation.FromAppSettings, new WebServicesParameters("extensive", "extensive",250,2));
var query = from c in ctx.QuerySynergi
 where c.ImportDatabaseID == 2
 && c.CaseTypeD == "Audit p%"
 && c.StatusD == "Registered"
 && c.PersonInChargeD == "%extensive%" 
 && c.UnitInChargeD == "Unit 0%" 
 orderby c.CaseNo ascending
 select c;

foreach (var obj in query)

var query2 = from c in ctx.QuerySynergi
 where c.ImportDatabaseID == 2
 && c.CaseType == 115
 && c.Status == 1
 && c.PersonInCharge == 3
 && c.UnitInCharge == 1
 orderby c.CaseNo ascending
 select c;

foreach (var obj in query2)

Both examples produce the same result.

The LINQ provider is not finished yet. There are still a lot more search parameters to add to it, but it is a good example of a LINQ prototype for Synergi.


2018-05-25 08:09:48

Forbrukeretaten providers are mobile network operators. These companies have experience in mobile communications to provide reliable, fast and cheap mobile broadband connection. Using 3G or 4G technology, mobile networks can offer mobile broadband through their networks so that the Internet is available where there is a mobile signal

2018-06-20 11:51:28

I will prefer this blog because it has much more informative stuff.

print profit

2018-06-27 04:57:14

I was getting bore since morning but as soon as I got this link & reached at this blog, I turned into fresh and also joyful too.

plastic chairs

2018-06-29 07:19:14

The quality of your blogs and conjointly the articles and price appreciating.

Mark Curry Kansas City

2018-07-05 06:49:58

This blog is further than my expectations. Nice work guys!!!

2018-07-18 05:06:57

I would like to thank the developers of this remarkable website and to provide us the comfortability for earning after using it! I am feeling much more relaxed than before!

Forex Wealth Strategy

2018-07-30 04:54:57

I was pinning away for such type of blogs, thanks for posting this for us.

Forex Wealth Strategy

2018-07-30 04:55:03

I was pinning away for such type of blogs, thanks for posting this for us.

toxic family relationship

2018-08-15 11:29:06

Nice answers in replace of the question with real point of view and explaining about that.


2018-08-15 12:09:39

Quality stuff may be the key to invite the users to visit begin to see the blog site, that’s what this site provides.

Add comment

(no html)