StringTemplate.NET实例2

时间:2009-11-07 阅读: 佚名
StringTemplate query = new StringTemplate("SELECT $column; separator=\",\"$ FROM $table$;"); query.SetAttribute("column", "name"); query.SetAttribute("column", "email"); query.SetAttribute("table", "User"); 结果:SELECT name,email FROM User; 说明:这里的column有多个值,separator=","就表示每个值之间用,隔开

StringTemplate query = new StringTemplate("SELECT $column; separator=\",\"$ FROM $table$;");
query.SetAttribute("column", "name");
query.SetAttribute("column", "email");
query.SetAttribute("table", "User");


结果:SELECT name,email FROM User;

 

说明:这里的column有多个值,separator=","就表示每个值之间用,隔开

[责任编辑:jumbot]

[发表评论] [收藏本页]