c# - Pass the table and column dynamically in dynamic LINQ -


I searched a lot, but I could not find what I was looking at. This can be very easy, usually in LINQ, we write selected queries in this way:

  var entityModel = new student entities; Var dept = (In an institution Model.STUDENT where a.NAME! = Select tap section.) Undoubtedly (). Orderbiz (w = & gt; w); // Student-Table, Name-column name, Department-column name  

How to write the same question using dynamic LINQ? Here the table name and column name names will be selected from either Win Win Control (Text Box / Cumblox) or String. Try it:

  var dept = "(in the unit modell." + TableName + "where a." + Cbo1.Text.ToString + "! = Zero." + Cbo2 Text .toString + "). Specific (). Commandbiz (w = & gt; w)";  

This is not working Can you tell me in the right direction?

You can not do this You need to create your dynamic SQL and run it on your database.

There, but this is not as dynamic as you want.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -