Show / Hide Table of Contents

Interface IDatabaseAccess

Provides an interface to access a database table or view.

Namespace: Paradigm.ORM.Data.DatabaseAccess
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IDatabaseAccess : IDisposable

Methods

| Improve this Doc View Source

Delete(IEnumerable<Object>)

Deletes a list of objects from the table or view.

Declaration
void Delete(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to delete.

Remarks

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

| Improve this Doc View Source

Delete(Object)

Deletes an object from the table or view.

Declaration
void Delete(object entity)
Parameters
Type Name Description
System.Object entity

Object to delete.

Remarks

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

| Improve this Doc View Source

DeleteAsync(IEnumerable<Object>)

Deletes a list of objects from the table or view.

Declaration
Task DeleteAsync(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to delete.

Returns
Type Description
Task
Remarks

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

| Improve this Doc View Source

DeleteAsync(Object)

Deletes an object from the table or view.

Declaration
Task DeleteAsync(object entity)
Parameters
Type Name Description
System.Object entity

Object to delete.

Returns
Type Description
Task
Remarks

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

| Improve this Doc View Source

Insert(IEnumerable<Object>)

Inserts a list of objects into the table or view.

Declaration
void Insert(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to insert.

Remarks

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

| Improve this Doc View Source

Insert(Object)

Inserts an object into the table or view.

Declaration
void Insert(object entity)
Parameters
Type Name Description
System.Object entity

Object to insert.

Remarks

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

| Improve this Doc View Source

InsertAsync(IEnumerable<Object>)

Inserts a list of objects into the table or view.

Declaration
Task InsertAsync(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to insert.

Returns
Type Description
Task
Remarks

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

| Improve this Doc View Source

InsertAsync(Object)

Inserts an object into the table or view.

Declaration
Task InsertAsync(object entity)
Parameters
Type Name Description
System.Object entity

Object to insert.

Returns
Type Description
Task
Remarks

If there are more than one element to insert, please use the overloaded method Insert(IEnumerable<Object>) because is prepared to batch the operation, and preventing 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<object> Select()
Returns
Type Description
List<System.Object>

A list of objects that belong to the table or view.

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<object> 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<System.Object>

A list of objects that belong to the table or view.

| Improve this Doc View Source

SelectAsync()

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

Declaration
Task<List<object>> SelectAsync()
Returns
Type Description
Task<List<System.Object>>

A list of objects that belong to the table or view.

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<object>> 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<System.Object>>

A list of objects that belong to the table or view.

| Improve this Doc View Source

SelectOne(Object[])

Selects one element from the database.

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

Array of id values.

Returns
Type Description
System.Object

Element 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<object> SelectOneAsync(params object[] ids)
Parameters
Type Name Description
System.Object[] ids

Array of id values.

Returns
Type Description
Task<System.Object>

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

| Improve this Doc View Source

Update(IEnumerable<Object>)

Updates a list of objects stored in the table or view.

Declaration
void Update(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to update.

Remarks

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

| Improve this Doc View Source

Update(Object)

Updates an object already stored in the table or view.

Declaration
void Update(object entity)
Parameters
Type Name Description
System.Object entity

Object to insert.

Remarks

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

| Improve this Doc View Source

UpdateAsync(IEnumerable<Object>)

Updates a list of objects stored in the table or view.

Declaration
Task UpdateAsync(IEnumerable<object> entities)
Parameters
Type Name Description
IEnumerable<System.Object> entities

List of entities to update.

Returns
Type Description
Task
Remarks

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

| Improve this Doc View Source

UpdateAsync(Object)

Updates an object already stored in the table or view.

Declaration
Task UpdateAsync(object entity)
Parameters
Type Name Description
System.Object entity

Object to insert.

Returns
Type Description
Task
Remarks

If there are more than one element to update, please use the overloaded method Update(IEnumerable<Object>) because is prepared to batch the operation, and preventing 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)
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.