原文:http://ayende.com/blog/1606/reflection-emit-vs-codedom Both technologies allow you to generate executable code at runtime (even though CodeDOM may not have been originally intended for this). This opens up some interesting possibilities (Rhino Moc…
动态创建Entity Framework模型并且创建数据库 使用System.Reflection.Emit+Code First model创建以下的一个实体类和DbContext并且创建数据库: 1 using System; 2 3 public class Blog 4 5 { 6 7 private int id; 8 9 private string name; 10 11 public int ID 12 13 { 14 15 get 16 17 { 18 19 return th…