天天看點

Subsonic3.0 為視圖增加解析功能

To include views in your project

simply open SQLServer.ttinclude Find the query that load the tables ( search form ‘const string TABLE_SQL’) then change it to

const string TABLE_SQL=@”SELECT *

FROM INFORMATION_SCHEMA.TABLES

WHERE TABLE_TYPE=’BASE TABLE’

union

select Table_catalog, table_schema, table_name, ‘View’ table_type

from information_schema.views”;

if you are using it in an asp.net project you can exclude the aspnet table and views like so

and table_name not like ‘%aspnet_%’

from information_schema.views

where table_name not like ‘%aspnet_%’”;

繼續閱讀