简体   繁体   中英

Generating Class Object from Postgresql Database ServiceStack.Ormlite

We are in the process of developing a brand new application.

We want to use ASP.NET MVC 5 with ServiceStack.Ormlite.

Also want to use Postgresql database to store relational objects / tables.

Question: Is there a way / tool to generate C# Class Objects from the Postgresql Database which the ORM then can use to perform operations on the tables.

EG I have a table called "Person" in the Database.

What I want to do is, using some tool (Need to know which tool) to generate the C# class object so I can use servicestack.ormlite to add a new person to the table.

Then if I add a column to that table, I generate a new class to replace the old one.

Is that possible and which tool will allow me to do that?

OrmLite's primarily a code-first ORM but does have T4 Templates to help with initially generating the code-first POCO's for existing database tables.

Although after generating the POCO's, I'd be maintaining them (ie code-first) from that point forward.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM