public T Find<T>(int id) { Type type = typeof(T); string sql = $"SELECT {string.Join(",", type.GetProperties().Select(p => $"[{p.Name}]"))} FROM [{type.Name}] WHERE ID={id}"; }
去看看Dapper的原理怎么写的。。