Code snippet to enable usage of raw sql data (SQLStreamProvider)

Sep 16, 2013 at 12:08 PM
if (String.IsNullOrWhiteSpace(args.TargetNamespace) || String.IsNullOrWhiteSpace(args.RootElementName))
                        {
                            //Get the raw xml output
                            memoryStream = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes((string)command.ExecuteScalar()));
                        }