Session setting to support indexed views
I am using indexed views in my database. So client should have some session connection setting to call them. I am using ado.net connection, command to call stored procedures. Every time I have to call a stored procedure I create connection (I hope connection pool allows me to do this quickly) and execute a command to apply these settings to current connection. // some code to create a new connection //... //... if (connection.State != ConnectionState.Open) { connection.Open(); } using (var cmd = connection.CreateCommand()) { cmd.CommandType = CommandType.Text; cmd.CommandText = @" SET ANSI