Dapper.Contrib: How to get a row by filtering on column other than ID?
问题 My class is like below: [Table("tblUser")] public class User { [Key] public int Id { get; set; } public string Title { get; set; } } Using Dapper.Contrib, is there a way to get the User record by Title instead of Id? If I query like below, it works. But, I want to filter on Title column which is not a key. await connection.GetAsync<User>(Id); 回答1: Looking at the documentation, Dapper.Contrib does not support retrieval of records using criteria other than key. In other words, it does not