mardi 28 novembre 2017

Research appropriate tools for query building

guys, please give me some advice to choose appropriate tools for my requirements.

I have some object (for example SQLBuilder) that receives some dto (that represents native random SQL) and parse it.

SQLBuilder also is supposed to know how:

1) Work with LINQ or something like this (It's the hardest part, because for this purpose we need static types (linq to sql provider), but we don't know concrete types. Queries that we received can work with be random tables):

  • SQLBuilder.Where( x=> x.id == 2 )

2) Release native SQL:

  • SQLBuilder.ToSQL ()

3) Append native SQL in different parts and replace old one if it already exists there:

 - SQLBuilder.AppendWhereSQL ( "Where id = 3")
 - SQLBuilder.AppendSelectSQL ("Select Id, Name")
... etc.

I think it's a relatively common task in developing and there is exists ready appropriate tools (framework, dll etc.) that implement similar functionality

Aucun commentaire:

Enregistrer un commentaire