tmsmith / Dapper-Extensions

Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance.
1.79k stars 585 forks source link

When using Predicates, table attribute is ignored. #227

Open DeverP opened 4 years ago

DeverP commented 4 years ago

Having some trouble with the following code:

using (var cn = new SqlConnection(GlobalSettings.ConnectionString)) { var predicate = Predicates.Field<CustomerDto>(f => f.LicenseId, Operator.Eq, licenseId); response = cn.GetList<CustomerDto>(predicate).ToList(); }

Class: CustomerDto having [Table("Customer")] set, but it still looking for a table called CustomerDto in the database.

valfrid-ly commented 2 years ago

Did you try the latest version??

Did you create the mappings??