public virtual TEntity GetById(TKeyType id)
        {
            var result = default(TEntity);

            _povider.ContextAction(c =>
            {
                result = c.Query <TEntity>(_povider.SqlGetById(SchemeTableName), new { id }).FirstOrDefault();
            });
            return(result);
        }
Ejemplo n.º 2
0
 public virtual test_dapper_core_item GetById(IDbConnection c, int id)
 {
     return(c.Query <test_dapper_core_item>(_provider.SqlGetById(SchemeTableName), new { Id = id }).FirstOrDefault());
 }