Exemple #1
0
        public TVal Load <TVal>(TKey id) where TVal : class
        {
            var result = QueryFor <TVal> .For(_connection,
                                              string.Format("SELECT [Data] from {0} where Id = @id", SqlDoc.tableName <TVal>()),
                                              new Dictionary <string, object> {
                { "id", id }
            });

            return(result.First());
        }
Exemple #2
0
 public IEnumerable <TVal> Query <TVal>(string sql, Dictionary <string, object> parameters = null)
 {
     return(QueryFor <TVal> .For(_connection, sql, parameters));
 }