Show / Hide Table of Contents

Method DeleteAsync

| Improve this Doc View Source

DeleteAsync(CancellationToken)

Deletes all records in this database table.

Declaration
public Task<int> DeleteAsync(CancellationToken ct = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

| Improve this Doc View Source

DeleteAsync(Func<T, _Boolean>, CancellationToken)

Deletes records in this database table by condition.

Declaration
public Task<int> DeleteAsync(Func<T, _Boolean> where, CancellationToken ct = default(CancellationToken))
Parameters
Type Name Description
System.Func<T, _Boolean> where

The condition.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

| Improve this Doc View Source

DeleteAsync<TSource>(DbSet<TSource>, CancellationToken)

Deletes records in this database table from matching database recordset.

Declaration
public Task<int> DeleteAsync<TSource>(DbSet<TSource> source, CancellationToken ct = default(CancellationToken))

    where TSource : class, T, new()
Parameters
Type Name Description
DbSet<TSource> source

The matching database recordset.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source database recordset.

| Improve this Doc View Source

DeleteAsync<TSource>(DbSet<TSource>, Func<TSource, T, KeyMapping>, CancellationToken)

Deletes records in this database table from matching database recordset.

Declaration
public Task<int> DeleteAsync<TSource>(DbSet<TSource> source, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))

    where TSource : class, IEntity, new()
Parameters
Type Name Description
DbSet<TSource> source

The matching database recordset.

System.Func<TSource, T, KeyMapping> keyMapper

Provides key mapping between source database recordset and this table.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source database recordset.

| Improve this Doc View Source

DeleteAsync<TSource>(DataSet<TSource>, Int32, CancellationToken)

Deletes from matching row in DataSet.

Declaration
public Task<int> DeleteAsync<TSource>(DataSet<TSource> source, int rowIndex, CancellationToken ct = default(CancellationToken))

    where TSource : class, T, new()
Parameters
Type Name Description
DataSet<TSource> source

The source matching DataSet.

System.Int32 rowIndex

The row index in the DataSet.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source DataSet.

| Improve this Doc View Source

DeleteAsync<TSource>(DataSet<TSource>, Int32, Func<TSource, T, KeyMapping>, CancellationToken)

Deletes from matching row in DataSet.

Declaration
public Task<int> DeleteAsync<TSource>(DataSet<TSource> source, int rowIndex, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))

    where TSource : class, IEntity, new()
Parameters
Type Name Description
DataSet<TSource> source

The source matching DataSet.

System.Int32 rowIndex

The row index in the DataSet.

System.Func<TSource, T, KeyMapping> keyMapper

Provides key mapping between source DataSet and this table.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source DataSet.

| Improve this Doc View Source

DeleteAsync<TSource>(DataSet<TSource>, CancellationToken)

Deletes records in this database table from matching DataSet.

Declaration
public Task<int> DeleteAsync<TSource>(DataSet<TSource> source, CancellationToken ct)

    where TSource : class, T, new()
Parameters
Type Name Description
DataSet<TSource> source

The source matching DataSet.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source DataSet.

| Improve this Doc View Source

DeleteAsync<TSource>(DataSet<TSource>, Func<TSource, T, KeyMapping>, CancellationToken)

Deletes records in this database table from matching DataSet.

Declaration
public Task<int> DeleteAsync<TSource>(DataSet<TSource> source, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))

    where TSource : class, IEntity, new()
Parameters
Type Name Description
DataSet<TSource> source

The source matching DataSet.

System.Func<TSource, T, KeyMapping> keyMapper

Provides key mapping between source DataSet and this table.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Number of records deleted.

Type Parameters
Name Description
TSource

Entity type of the source DataSet.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest