1. I would like to thank the previous companies for writing this framework, which forced me to learn more about some of the functions of LINQ. the framework is not similar to the iqueryable query, but it is not written based on iqueryable, so it is very convenient to expand, finally, multi-Table query is implemented and some LINQ from syntaxes are supported (lazy loading technology does not support the into syntax ).
For example:
VaR Q1 = From X In DMS. Create <sysrole> ( False , False ) Where X. sysroleid> 0 & Amp; X. rolename. Like ( " S " ) Select X; VaR Q2 = From X In DMS. Create <sysrole> ( False , False ) Join y In DMS. Create <sysrolepower> () On X. sysroleid equals Y. sysroleid Select New {X. sysroleid, Y. sysrolepowerid, X. rolename };
2. Support the subquery syntax (as must be performed on the table name in the subquery)
var query = DMS. create
(). where (q => q. sysrolepowerid>
0 & Q. remark. like (
"
QQ
" )). select (q =>
New
{q. sysrolepowerid, rolename = DMS. create
(). as (
"
x
" ). where (x => X. sysroleid = Q. sysroleid & X. rolename. like (
"
S
"
)). tocolumn
string
(),});
3. the default data return type is datatable. Generally, you can use tolist <any type> () to set the value based on the attribute fields of the type. Unlike the tolist in iqueryable, data cannot be of the type. Select must be assigned a value. greatly reducedCodeQuantity
4. Supports the data filtering interface. You can implement the idmslinqqueryfilter interface outside the framework to configure the vertical data permission for filtering tables. Horizontal data permissions can be adjusted by splicing columnsclip.
< Configuration > < Configsections > < Section Name = "Dmslinqqueryprovider" Type = "Kingnet. dmsframe. dmslinq. dmslinqqueryprovider, kingnet. dmsframe. dmslinq" /> </ Configsections > < Dmslinqqueryprovider > < Add Key = "Query1" Value = "Kingnet. dmsframe. Business. queryfilterbll, kingnet. dmsframe. Business" /> </ Dmslinqqueryprovider > </ Configuration >
5. Supports field concatenation query or as a condition
VaR query2 = DMS. Create<Userinfo>(). Select (q => q. Columns (Q. Title + q. username). As ("username ")));