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)); }
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)); }