Rop.Dapper.ContribEx 1.0.13

dotnet add package Rop.Dapper.ContribEx --version 1.0.13                
NuGet\Install-Package Rop.Dapper.ContribEx -Version 1.0.13                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rop.Dapper.ContribEx" Version="1.0.13" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rop.Dapper.ContribEx --version 1.0.13                
#r "nuget: Rop.Dapper.ContribEx, 1.0.13"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rop.Dapper.ContribEx as a Cake Addin
#addin nuget:?package=Rop.Dapper.ContribEx&version=1.0.13

// Install Rop.Dapper.ContribEx as a Cake Tool
#tool nuget:?package=Rop.Dapper.ContribEx&version=1.0.13                

Rop.Dapper.ContribEx

Features

Rop.Dapper.ContribEx includes a DapperHelperExtend class to access to hidden information about classes and their attributes.

Rop.Dapper.ContribEx adds more helper methods for inserting, getting, updating and deleting records.

DapperHelperExtend

The full list of helpers for hidden information are:

List<PropertyInfo> ExplicitKeyPropertiesCache(Type type);
List<PropertyInfo> KeyPropertiesCache(Type type);
List<PropertyInfo> TypePropertiesCache(Type type);
List<PropertyInfo> ComputedPropertiesCache(Type type);
ISqlAdapter GetFormatter(IDbConnection connection);
IEnumerable<string> GetColumnNames(IEnumerable<PropertyInfo> props);
string GetTableName(Type type);
string GetForeignDatabaseName(Type type);
string SelectGetCache(Type type);
string SelectGetAllCache(Type type);
string SelectGetSlimCache(Type type);
string SelectGetAllSlimCache(Type type);
string DeleteByKeyCache(Type type);

The full list of helpers for class/table/key information are:

(PropertyInfo propkey, bool isautokey) GetSingleKey(Type t);
KeyDescription GetKeyDescription(Type t);
KeyDescription GetKeyDescription<T>();
object GetKeyValue<T>(T item);
SetKeyValue<T>(T item, object value);
(KeyDescription keydescription, object value) GetKeyDescriptionAndValue<T>(T item);

The full list of helpers to format list of keys are:

string GetIdList(IEnumerable<int> ids);
string GetIdList(IEnumerable<string> ids);
string GetIdListDyn(IEnumerable ids);

Miscellaneous helpers:

string GetMemberName<T>(this Expression<T> expression);

ConnectionHelper

The full list of extension methods in ConnectionHelper are:

Delete methods

 bool DeleteByKey<T>(this IDbConnection conn, dynamic id, IDbTransaction tr = null, int? commandTimeout = null);
 bool Delete<T>(this IDbConnection conn, IDbTransaction tr, dynamic key, int? commandTimeout = null);
 Task<bool> DeleteByKeyAsync<T>(this IDbConnection conn, dynamic id, IDbTransaction tr = null, int? commandTimeout = null);
 Task<bool> DeleteAsync<T>(this IDbConnection conn, IDbTransaction tr, dynamic key,int? commandTimeout=null);

GetSlim methods

T GetSlim<T>(this IDbConnection connection, dynamic id, IDbTransaction transaction = null, int? commandTimeout = null);
IEnumerable<T> GetAllSlim<T>(this IDbConnection connection, IDbTransaction transaction = null, int? commandTimeout = null);
List<T> GetSomeSlim<T>(this IDbConnection conn, IEnumerable ids, IDbTransaction tr = null);
List<T> GetWhereSlim<T>(this IDbConnection conn, string where, object param=null, IDbTransaction tr = null);
Task<T> GetSlimAsync<T>(this IDbConnection connection, dynamic id, IDbTransaction transaction = null, int? commandTimeout = null);
Task<IEnumerable<T>> GetAllSlimAsync<T>(this IDbConnection connection, IDbTransaction transaction = null, int? commandTimeout = null);

GetSome methods

List<T> GetSome<T>(this IDbConnection conn, IEnumerable ids, IDbTransaction tr = null, int? commandTimeout = null);
List<T> GetWhere<T>(this IDbConnection conn, string where, object param=null, IDbTransaction tr = null, int? commandTimeout = null);
IEnumerable<(dynamic id, T value)> QueryIdValue<TA, T>(this IDbConnection conn, string field, string where, object param=null, IDbTransaction tr = null, int? commandTimeout = null);
IEnumerable<(dynamic id, A valueA, B valueB)> QueryIdValue<TA, A, B>(this IDbConnection conn, string fieldA, string fieldB, string where, object param=null, IDbTransaction tr = null, int? commandTimeout = null);
IEnumerable<(dynamic id, T value)> GetIdValues<TA, T>(this IDbConnection conn, IEnumerable ids, string field, IDbTransaction tr = null,int? commandtimeout=null);
IEnumerable<(dynamic id, A valueA, B valueB)> GetIdValues<TA, A, B>(this IDbConnection conn, IEnumerable ids, string fieldA, string fieldB, IDbTransaction tr = null,int? commandtimeout=null);
Task<List<T>> GetSomeAsync<T>(this IDbConnection conn, IEnumerable ids, IDbTransaction tr = null,int? timeout=null);
Task<List<T>> GetWhereAsync<T>(this IDbConnection conn, string where, object param=null, IDbTransaction tr = null,int? timeout=null);
Task<IEnumerable<(dynamic id, T value)>> QueryIdValueAsync<TA, T>(this IDbConnection conn, string field, string where, object param=null, IDbTransaction tr = null,int? timeout=null);
Task<IEnumerable<(dynamic id, A valueA, B valueB)>> QueryIdValueAsync<TA, A, B>(this IDbConnection conn, string fieldA, string fieldB, string where, object param=null, IDbTransaction tr = null,int? timeout=null);
Task<List<(dynamic id, T value)>> GetIdValuesAsync<TA, T>(this IDbConnection conn, IEnumerable ids, string field, IDbTransaction tr = null,int? timeout=null);
Task<List<(dynamic id, A valueA, B valueB)>> GetIdValuesAsync<TA, A, B>(this IDbConnection conn, IEnumerable ids, string fieldA, string fieldB, IDbTransaction tr = null,int? timeout=null);      

Insert or Update methods

int InsertOrUpdate<T>(this IDbConnection conn, T item, IDbTransaction tr = null,int? timeout=null);
bool UpdateIdValue<TA, T>(this IDbConnection conn, (dynamic id, T value) value, string field, IDbTransaction tr = null, int? timeout = null);
bool UpdateIdValue<TA, T>(this IDbConnection conn, dynamic id, T value, string field, IDbTransaction tr = null, int? timeout = null);
Task<int> InsertOrUpdateAsync<T>(this IDbConnection conn, T item, IDbTransaction tr = null,int? timeout=null);
Task<bool> UpdateIdValueAsync<TA, T>(this IDbConnection conn, (dynamic id, T value) value, string field, IDbTransaction tr = null,int? timeout=null);
Task<bool> UpdateIdValueAsync<TA, T>(this IDbConnection conn, dynamic id, T value, string field, IDbTransaction tr = null, int? timeout = null);

Complex methods

 List<T> QueryJoin<T, M>(this IDbConnection conn, string query, object param, Action<T, M> join, IDbTransaction tr = null);

(C)2022 Ramón Ordiales Plaza

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.13 263 11/15/2023
1.0.12 412 8/23/2022
1.0.11 387 8/22/2022
1.0.10 375 8/21/2022
1.0.9 354 8/21/2022
1.0.8 375 8/21/2022
1.0.7 373 8/20/2022
1.0.6 424 2/8/2022
1.0.5 426 2/4/2022
1.0.4 437 2/4/2022
1.0.3 423 1/26/2022
1.0.2 420 1/26/2022
1.0.1 414 1/26/2022