First, I will introduce several articles:
Emit Learning Series Article navigation
Use the MyMeta component to obtain the database structure
A little reflection, and a little more Emit -- extremely simplified Entity!
These are all good things. Of course, the premise of thinking about these things is that there are some concepts of reflection, assembly, and domain and there are some attempts, otherwise it will be a little tired.
For people familiar with reflection, Emit is used to write information (programs), such as creating classes and methods.
I have to say that I am really uncomfortable with IL. I used to learn compilation. Although I worked very hard, I stayed at a very conceptual level. I don't have the motivation to be proficient. But don't be discouraged, don't be afraid of anything. You can do this by writing code first, and then using idm to view IL. Although this is a method, it is always uncomfortable. Here is a Reflector plug-in:ReflectionEmitLanguage. Is it so nice? By the way, the person who used it for the first time may not be able to find the place to view it. After adding the plug-in, you can see it in the language selection area on the menu.
Well, all the obstacles to constructing the class are flattened. Next, we will go to the Code architecture.
People who are familiar with multi-layer architectures must be familiar with entities. This depressing thing is so disgusting. Haha, it's always written one by one. Simply use a code generation tool, almost worse than what I wrote. Although there is nothing in the entity, other classes related to the entity are all problems.
There is also that it is always not synchronized with the database (^_^ needs to be changed frequently). With the Emit tool, it is a problem with the database. MyMeta is out, and its naming rules and architecture are too helpful, although I am not used to writing code, I have to admit that it is very concise. It's too easy to write database-related things.
Finally, there are some questions about how to simplify Entity for reflection of Emit. The third article is also very good and can be used for reference.