Pre-declaration: This library is for learning and reference only. Document address
Because I came into contact with excellent ORMs such as Dapper during my studies, I have aroused my interest and I want to try writing similar ORMs myself.
This library also extends IDbConnection. When writing Mellivora at first, dynamic cache was also implemented by pure Emit, with large amount of code and not easy to debug. A cache method has 1,000 lines in small quantities. Therefore, in 2017, the 2016 version of Natasha was released. This version simplified and optimized IL programming for the first time. Natasha was used to refactor the previous Mellivora's cache method, reducing the amount of code by about half, and ensuring performance.
When optimizing details, Mellivora refers to a large amount of Dapper code, while Mellivora is more intuitive in cache design. It is also equipped with the entity class analysis library Vasily, which analyzes entity classes and automatically generates Sql, thereby directly supporting Add, Delete, Modify, and Get methods. Among them, Vasily adds extensions to String classes to make string splicing better and faster (better than StringBuilder, join)
The following is the performance comparison between Mellivora and Dapper after preheating is completed:
The above libraries can be used to modify, research and publish.
After writing Mellivora, Dapper has done a very good job in stability and performance balance, and is meticulous.
Open source address: Mellivora Github
Documentation reference: Mellivora API