Dapper.Contrib
Dapper.Contrib copied to clipboard
GetAll<T> only supports an entity with a single [Key] or [ExplicitKey] property. [Key] Count: 0, [ExplicitKey] Count: 2
[Table("MyTable")]
public class TableEntity
{
[ExplicitKey]
public string Name { get; set; }
[ExplicitKey]
public Guid Id { get; set; }
}
The error happens when calling
return await GetAllAsync<MyTable>();
me too
I'm running into this as well. I have a table with a composite key. Hope this gets some attention soon.
I've got this problem, too
Same issue
Same problem
using Dapper.Contrib.Extensions;
[Table("MyTable")]
public class TableEntity
{
[Key]
public Guid Id { get; set; }
public string Name { get; set; }
}
Check your library of the [ExplicitKey] and try adding [Key] to Guid only.
Library of the key must be Dapper.Contrib.Extensions;