Synergi LINQ Provider Prototype

  • .NET/Synergi/LINQ/C#
  • Published: 2014-09-03 02: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;

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;

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.


Comments

forbrukeretaten.no

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 forbrukeretaten.no.

http://hqwebinar.org

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!!!

casino-online-chile.cl

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.

kviklån

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.

Spin Rewriter

2018-09-04 10:13:45

Hi I was searching for the blogs for many times, now I have reached at the right place.

Hi I was searching for the blogs for many times, now I have reached at the right place.

dansexoticpets.com

2018-09-17 05:57:48

Remarkable blog! I have no words to praise, it has really allured me.

amazing selling machine

2018-09-29 06:15:41

Hi I was searching for the blogs for many times, now I have reached at the right place.

vegitable recipes

2018-09-29 07:35:55

It’s a classic great for me to go to this blog site, it offers helpful suggestions

Women's Health

2018-10-02 16:17:08

The caliber of information that you're offering is merely wonderful.

locksmith Dallas TX

2018-10-24 11:16:38

While the admin of the web site is working, no question soon it will likely be famous, due to its feature blogs.

Gabriel

2018-11-17 06:41:09

I Never ever found such edifying blogs.

jacksan

2018-12-08 10:29:21

The caliber of information that you're offering is merely wonderful.

Add comment

(no html)
(optional)
(optional)