We're currently building a new application and part of the functionality we want to include for users is the ability to build ad-hoc querys through the web UI for reporting purposes.
我们目前正在构建一个新的应用程序,我们希望为用户提供的部分功能是通过Web UI构建临时查询以进行报告的能力。
e.g. The user may select the Entity1 report.
例如用户可以选择Entity1报告。
They are then able to select the criteria through the UI
然后,他们可以通过UI选择标准
pseudo example: ((Entity1.Type = 'this' OR Entity1.Type = 'something else') AND Entity1.CreatedDate > '01-01'2012')
伪示例:((Entity1.Type ='this'OR Entity1.Type ='something else')AND Entity1.CreatedDate> '01 -01'2012')
Does anyone know if there is a good solution available (open source or paid) as this seems like it might be a lot of work to implement a bespoke solution.
有没有人知道是否有一个好的解决方案(开源或付费),因为这似乎可能需要很多工作才能实现一个定制的解决方案。
Further to this we are using Entity Framework v4.1 magical unicorn edition.
除此之外,我们正在使用Entity Framework v4.1神奇的独角兽版。
2 个解决方案
#1
2
If you build a UI that gives results in a structured form (e.g. {entityType.property}{operation}{value}) then it should be fairly straightforward to dynamically build an expression for this.
如果您构建一个以结构化形式提供结果的UI(例如{entityType.property} {operation} {value}),那么为此动态构建表达式应该相当简单。
#2
1
I decided to use http://devtools.korzh.com/query-builder-aspnet/ as it has saved me a lot of development time.
我决定使用http://devtools.korzh.com/query-builder-aspnet/,因为它为我节省了大量的开发时间。
#1
2
If you build a UI that gives results in a structured form (e.g. {entityType.property}{operation}{value}) then it should be fairly straightforward to dynamically build an expression for this.
如果您构建一个以结构化形式提供结果的UI(例如{entityType.property} {operation} {value}),那么为此动态构建表达式应该相当简单。
#2
1
I decided to use http://devtools.korzh.com/query-builder-aspnet/ as it has saved me a lot of development time.
我决定使用http://devtools.korzh.com/query-builder-aspnet/,因为它为我节省了大量的开发时间。