Can we create equivalent LINQ queries by reading the queries from a JSON Object?

  • Thread starter Thread starter Priyapr
  • Start date Start date
P

Priyapr

Guest
Hi, I am trying to create a generic LINQ converter (with simple join, where filter) reading the query related input from a JSON.

Example of the JSON

var stepName = "people Data";
var derivationMethod = "Direct";
var sources = [
{name:"[dbo].[people]", usage:"Primary"}
];
var joins = {
operator: 'AND',
conditions: [],
subgroups: []
};
var filters = {
operator: 'AND',
conditions: [
{attribute: '[dbo].[people].[emptype]', operator: '=', operand: {type: 'Literal', value: 'FullTime'}}
],
subgroups: []
};
var derivedAttributes = [
{name: "ID", usage: "uniqueidentity", source: "[dbo].[People].[ID]"},
{name: "Employee Number", usage: "Any", source: "[dbo].[People].[employeeNumber]"},
{name: "Department ID", usage: "Any", source: "[dbo].[People].[DeptNumber]"},
{name: "Salary", usage: "Any", source: "[dbo].[People].[Salary]"}
];



And expectation is to read this JSON and create the equivalent LINQ query.

Any idea will behelpful.


Thanks.




Bishnupriya Pradhan

Continue reading...
 
Back
Top