Skip to content

MySQL Crud methods

Adam O'Neil edited this page Jul 21, 2019 · 4 revisions

Use the namespace Postulate.MySql.IntKey to make these extension methods available to IDbConnection. These are simply wrappers for the low-level Crud methods, but I'm showing links in source where the MySQL-specific methods are found.

  • void CreateTable (this IDbConnection connection, string tableName)
  • void Delete (this IDbConnection connection, int id, IUser user, string tableName)
  • Task DeleteAsync (this IDbConnection connection, int id, IUser user, string tableName)
  • bool Exists (this IDbConnection connection, int id, IUser user, string tableName)
  • Task<bool> ExistsAsync (this IDbConnection connection, int id, IUser user, string tableName)
  • bool ExistsWhere (this IDbConnection connection, object criteria, IUser user, string tableName)
  • Task<bool> ExistsWhereAsync (this IDbConnection connection, object criteria, IUser user, string tableName)
  • TModel Find (this IDbConnection connection, int id, IUser user, string tableName)
  • Task<TModel> FindAsync (this IDbConnection connection, int id, IUser user, string tableName)
  • TModel FindWhere (this IDbConnection connection, object criteria, IUser user, string tableName, FindWhereMethod method)
  • Task<TModel> FindWhereAsync (this IDbConnection connection, object criteria, IUser user, string tableName, FindWhereMethod method)
  • int Insert<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • Task<int> InsertAsync<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • int Merge<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • Task<int> MergeAsync<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • void PlainInsert<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • Task PlainInsertAsync<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • int Save<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • int Save<TModel> (this IDbConnection connection, TModel object, params string[] propertyNames)
  • Task<int> SaveAsync<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • Task<int> SaveAsync<TModel> (this IDbConnection connection, TModel object, params string[] propertyNames)
  • void Update<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • void Update<TModel> (this IDbConnection connection, TModel object, IUser user, params Expression<Func<TModel, object>>[] setColumns)
  • Task UpdateAsync<TModel> (this IDbConnection connection, TModel object, IUser user, string tableName)
  • Task UpdateAsync<TModel> (this IDbConnection connection, TModel object, IUser user, params Expression<Func<TModel, object>>[] setColumns)
You can’t perform that action at this time.