DeeJayTC / net-dynamic-api

A library that turns your model into a fully working API, define your model as markdown (soon), json or c#.
https://www.tcdev.de/tcdev-api-generator-getting-started
MIT License
193 stars 18 forks source link

Postgres is not recognized as a database type #32

Closed moalamri closed 2 years ago

moalamri commented 2 years ago
Unhandled exception. 
System.InvalidOperationException: Failed to convert configuration value 
at 'Api:Database:DatabaseType' to type 'TCDev.APIGenerator.DbType'.
 ---> System.FormatException: Postgres is not a valid value for DbType.
 ---> System.ArgumentException: Requested value 'Postgres' was not found.

Could be because the enum of Postgres type is commented out here? Or is it not yet supported?

Thank you..

DeeJayTC commented 2 years ago

Ahh i think thats actually documented wrong or old. That Enum is a relic from an older version.

Try using https://www.nuget.org/packages/TCDev.APIGenerator.Data.Postgres/

And use AddDataContextSQL()

https://docs.rasepi.com/database-options

Have to update the docs here @moalamri and big sorry for the delay...vacation and stuff, forgot to check the issues!

moalamri commented 2 years ago

It's totally ok, thank you so much. This is a huge time-saving tool 👍 I ended up using ServiceStack OrmLite & AutoQuery, which pretty much does the same except that it don't use EF.

I'll close this issue as you have cleared up the confusion 👍

Thank you