Moon. orm already exists. NET 2.0 has been applied to the extreme. both Performance and convenience have reached a high level. the addition of dynamic compilation improves its performance to the extreme, and convenience can only be improved through an alternative design. list <object> resultList = DBFactory. getAutoEntitiesList (SQL, className); if one of the objects is entity-> new className (), you should think about how to conveniently obtain the value of an attribute. use entity [""] in the previous method. to <String> () method To get the value of a specific attribute. If you continue To apply this mode, it does not make much sense, but in 4.0 of the environment, you can directly write code To get the attribute.
ORM has really reached the limit in 2.0. What we need to do now is to create a code generator and a beautiful document and instance code at night.
It seems that I have missed a step, that is, a self-compilation process in dynamic compilation. during Self-compilation, I can detect my own code, generate entity sets based on my own code, and finally compile.
For example, when I encounter similar code: List <object> resultList = DBFactory. getAutoEntitiesList (SQL, className); I will do two things: generate the dll used by the object, let the project reference it, and then put this line of code
Modified: List <className> resultList = DBFactory. GetEntities <className> (SQL); after the compilation is complete, cancel the operation.