Ejemplo n.º 1
0
        public static string GetSourceFromDb(RenderContext context, string layoutNameOrId)
        {
            var sourceprovider = context.GetItem <ICommandSourceProvider>("commandsource");

            if (sourceprovider == null)
            {
                sourceprovider = new DBCommandSourceProvider();
            }

            return(sourceprovider.GetLayout(context, layoutNameOrId));
        }
Ejemplo n.º 2
0
        public static string GetSourceFromDb(RenderContext context, string filename)
        {
            /// try get view...
            ///
            var sourceprovider = context.GetItem <ICommandSourceProvider>("commandsource");

            if (sourceprovider == null)
            {
                sourceprovider = new DBCommandSourceProvider();
            }

            return(sourceprovider.GetString(context, filename));
        }