public IEnumerable <T> All <T>() { var tableName = GetAliasName(typeof(T)); return(Db.All <KeyValue>(tableName).Select(item => item.value.Deserialize <T>())); }
/// <summary> /// <para>By default queries the table matching the class name</para> /// <para>-Table name can be overridden by adding an attribute on your class [Table("YourTableName")]</para> /// <para>Returns a list of all entities</para> /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cnn"></param> /// <returns>Gets a list of all entities</returns> public static IEnumerable <T> All <T>(this IDbConnection cnn) { return(cnn.All <T>(new { })); }