SQL implementation of razor template repository