Is there a .Net Micro ORM that will generate a db circuit?

We would like to get rid of NHibernate for something like Massive, PetaPoco, etc., but we really like the ability to automatically generate our database. With attributes, it seems that PetaPoco has the information needed to generate db, but I cannot find anything that says about it.

Is there an alternative Micro ORM that supports this?

+6
source share
3 answers

ServiceStack ORMLite is a Micro ORM that can create db schemas. It has CreateTable and DropTable methods.

+3
source

I examined this in detail almost 2 years ago.

At that time, the only package that could automatically create a db schema from a real-world object model (as opposed to a toy one) was the "big ORM" of Fluent NHibernate Automapping , so we ended up using it.

This is generally good for us (although, frankly, session management is a pain, and we are currently having some problems upgrading to FNH 1.3 / NH 3.2). But overall it was a big victory.

Subsonic looked very promising at the time - it was much easier to use than FNH / NH. However, he simply made very simple schemes, such as ActiveRecord automatically. The last thing I heard was no longer under active development, which is really very bad.

Other micro-ORM parameters that will generate the circuit may now be available, but I do not know about them.

If you just need persistance (as opposed to a relational database), you can look at some of the NoSQL options. I think RavenDB is very interesting - it seems as easy to use as Subsonic, but much more powerful. (licensing looks expensive though).

+1
source

It seems that SqlFu can create schemas as well as truncate, delete, and check if it exists.

0
source

Source: https://habr.com/ru/post/901840/


All Articles