Show / Hide Table of Contents

Interface IDatabaseAccess<TEntity>

Provides an interface to access a database table or view.

Inherited Members
IDatabaseAccess.InsertAsync(Object)
IDatabaseAccess.InsertAsync(IEnumerable<Object>)
IDatabaseAccess.UpdateAsync(Object)
IDatabaseAccess.UpdateAsync(IEnumerable<Object>)
IDatabaseAccess.DeleteAsync(Object)
IDatabaseAccess.DeleteAsync(IEnumerable<Object>)
IDatabaseAccess.Insert(Object)
IDatabaseAccess.Insert(IEnumerable<Object>)
IDatabaseAccess.Update(Object)
IDatabaseAccess.Update(IEnumerable<Object>)
IDatabaseAccess.Delete(Object)
IDatabaseAccess.Delete(IEnumerable<Object>)
Namespace: Paradigm.ORM.Data.DatabaseAccess.Generic
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IDatabaseAccess<TEntity> : IDatabaseAccess, IDisposable where TEntity : class
Type Parameters
Name Description
TEntity

A type containing or referencing the mapping information.

Methods

| Improve this Doc View Source

Delete(TEntity)

Deletes a from the table or view.

Declaration
void Delete(TEntity entity)
Parameters
Type Name Description
TEntity entity

to delete.

Remarks

If there are more than one element to delete, please use the overloaded method Delete(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

Delete(IEnumerable<TEntity>)

Deletes a list of from the table or view.

Declaration
void Delete(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of to delete.

Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

| Improve this Doc View Source

DeleteAsync(TEntity)

Deletes a from the table or view.

Declaration
Task DeleteAsync(TEntity entity)
Parameters
Type Name Description
TEntity entity

to delete.

Returns
Type Description
Task
Remarks

If there are more than one element to delete, please use the overloaded method Delete(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

DeleteAsync(IEnumerable<TEntity>)

Deletes a list of from the table or view.

Declaration
Task DeleteAsync(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of to delete.

Returns
Type Description
Task
Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

| Improve this Doc View Source

Insert(TEntity)

Inserts a into the table or view.

Declaration
void Insert(TEntity entity)
Parameters
Type Name Description
TEntity entity

to insert.

Remarks

If there are more than one element to insert, please use the overloaded method Insert(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

Insert(IEnumerable<TEntity>)

Inserts a list of into the table or view.

Declaration
void Insert(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of .

Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

| Improve this Doc View Source

InsertAsync(TEntity)

Inserts a into the table or view.

Declaration
Task InsertAsync(TEntity entity)
Parameters
Type Name Description
TEntity entity

to insert.

Returns
Type Description
Task
Remarks

If there are more than one element to insert, please use the overloaded method Insert(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

InsertAsync(IEnumerable<TEntity>)

Inserts a list of into the table or view.

Declaration
Task InsertAsync(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of .

Returns
Type Description
Task
Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

| Improve this Doc View Source

Select()

Selects a list of all the elements in a table or view.

Declaration
List<TEntity> Select()
Returns
Type Description
List<TEntity>

A list of .

Remarks

To select filtering results, use the overloaded method .

| Improve this Doc View Source

Select(String, Object[])

Selects a list of elements in a table or view.

Declaration
List<TEntity> Select(string whereClause, params object[] parameters)
Parameters
Type Name Description
System.String whereClause

A where filter clause. Do not add the "WHERE" keyword to it. If you need to pass parameters, pass using @1, @2, @3.

System.Object[] parameters

A list of parameter values.

Returns
Type Description
List<TEntity>

A list of .

| Improve this Doc View Source

SelectAsync()

Selects a list of all the elements in a table or view.

Declaration
Task<List<TEntity>> SelectAsync()
Returns
Type Description
Task<List<TEntity>>

A list of .

Remarks

To select filtering results, use the overloaded method .

| Improve this Doc View Source

SelectAsync(String, Object[])

Selects a list of elements in a table or view.

Declaration
Task<List<TEntity>> SelectAsync(string whereClause, params object[] parameters)
Parameters
Type Name Description
System.String whereClause

A where filter clause. Do not add the "WHERE" keyword to it. If you need to pass parameters, pass using @1, @2, @3.

System.Object[] parameters

A list of parameter values.

Returns
Type Description
Task<List<TEntity>>

A list of .

| Improve this Doc View Source

SelectOne(Object[])

Selects one element from the database.

Declaration
TEntity SelectOne(params object[] ids)
Parameters
Type Name Description
System.Object[] ids

Array of id values.

Returns
Type Description
TEntity

with the same id values as the values provider; otherwise null.

| Improve this Doc View Source

SelectOneAsync(Object[])

Selects one element from the database.

Declaration
Task<TEntity> SelectOneAsync(params object[] ids)
Parameters
Type Name Description
System.Object[] ids

Array of id values.

Returns
Type Description
Task<TEntity>

with the same id values as the values provider; otherwise null.

| Improve this Doc View Source

Update(TEntity)

Updates a already stored in the table or view.

Declaration
void Update(TEntity entity)
Parameters
Type Name Description
TEntity entity

to insert.

Remarks

If there are more than one element to update, please use the overloaded method Update(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

Update(IEnumerable<TEntity>)

Updates a list of stored in the table or view.

Declaration
void Update(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of to update.

Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

| Improve this Doc View Source

UpdateAsync(TEntity)

Updates a already stored in the table or view.

Declaration
Task UpdateAsync(TEntity entity)
Parameters
Type Name Description
TEntity entity

to insert.

Returns
Type Description
Task
Remarks

If there are more than one element to update, please use the overloaded method Update(IEnumerable<TEntity>) because is prepared to batch the operation, and preventing unnecessary roundtrips to the database.

| Improve this Doc View Source

UpdateAsync(IEnumerable<TEntity>)

Updates a list of stored in the table or view.

Declaration
Task UpdateAsync(IEnumerable<TEntity> entities)
Parameters
Type Name Description
IEnumerable<TEntity> entities

List of to update.

Returns
Type Description
Task
Remarks

This method utilizes batching to prevent unnecessary roundtrips to the database.

Extension Methods

ObjectExtensions.ThrowIfFails<TException>(Object, Action, String)
ObjectExtensions.ThrowIfFails<TException, TResult>(Object, Func<TResult>, String)
ObjectExtensions.ThrowIfFailsAsync<TException>(Object, Func<Task>, String)
ObjectExtensions.ThrowIfFailsAsync<TException, TResult>(Object, Func<Task<TResult>>, String)

See Also

IDatabaseAccess
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.