Skip to content

Crud method reference

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

These are the low-level CRUD methods called by the SQL Server and MySQL providers. Any new database provider should surface these methods as extension methods.

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