public void CreatePropertyVirtual() { Table table = new Table { Name = "tbl1", Schema = "sch1", Database = "db1" }; var asmName = "testAsm" + Guid.NewGuid().ToString(); var typeBuilder = DynamicTypeBuilder.GetTypeBuilder(table, typeof(PocoBase), asmName); var property = DynamicTypeBuilder.CreateVirtualProperty(typeBuilder, "prop11", typeof(int)); Assert.AreEqual("get_prop11", property.GetGetMethod(false).Name); Assert.AreEqual(typeof(int), property.GetGetMethod(false).ReturnType); Assert.AreEqual(MethodAttributes.PrivateScope | MethodAttributes.Public | MethodAttributes.Virtual, property.GetGetMethod(false).Attributes); Assert.AreEqual("set_prop11", property.GetSetMethod(false).Name); }