Move code to scaffolding template. Generate sample for assetType