Пример #1
0
        public T GetDataObject <T>(SqlCommand command)
        {
            using (SqlConnection connection = new SqlConnection(Connection_String))
            {
                if (connection.State == ConnectionState.Closed)
                {
                    connection.Open();
                }

                command.Connection     = connection;
                command.CommandTimeout = Connection_Timeout;
                return(DataModelHelper.CreateObject <T>(command.ExecuteReader()));
            }
        }