You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eros Stein edited this page Jan 8, 2017
·
1 revision
To execute SQL queries we use the method ExecuteQuery<T>(string query, SqlParameters[] parameters).
Example:
using(varctx=newAppContext(newAppConfiguration())){varquery=ctx.ExecuteQuery<string>("SELECT Column_Name FROM MYDB.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @param",newSqlParameter("@param","tbDbVersion"));dbVersion=query.FirstOrDefault();}