nreco / data

Fast DB-independent DAL for .NET Core: abstract queries, SQL commands builder, schema-less data access, POCO mapping (micro-ORM).
https://www.nrecosite.com/dalc_net.aspx
MIT License
184 stars 39 forks source link

DBAdapter Select returns Empty Array #57

Closed xavidram closed 4 years ago

xavidram commented 4 years ago

I was going through your example found here: https://github.com/nreco/data/tree/master/examples/SqliteDemo.GraphQLApi

Instead of SqlLite I modified it for SQL server, updating most of the example code to suit SQL Server. But when it comes for the DatabaseMetadata to retrieve the columns for the Table, it returns an empty array.

The function I modified is located in the DatabaseMetadata.cs file. The function is called GetColumnsMetadata.

When I copy the SQL that is being sent and run it manually, I get all the Columns in the table provided. But when the _DbNrecoAdapter.Select() calls it, it returns empty.

image

When I look at the Db Adapter object, it all looks correct so I am stuck at this precise point from getting the DatabaseMetadata class to query the columns for the tables provided.

xavidram commented 4 years ago

Figured it out. The DataAnnotations above the model properties were not binding.