Show / Hide Table of Contents

Method Mock

| Improve this Doc View Source

Mock<TModel>(DbTable<TModel>)

Mocks the database table.

Declaration
protected void Mock<TModel>(DbTable<TModel> dbTable)

    where TModel : Model, new()
Parameters
Type Name Description
DbTable<TModel> dbTable

The database table should be mocked.

Type Parameters
Name Description
TModel

Model type of the database table.

| Improve this Doc View Source

Mock<TModel>(DbTable<TModel>, Func<DataSet<TModel>>)

Mocks the database table with data.

Declaration
protected void Mock<TModel>(DbTable<TModel> dbTable, Func<DataSet<TModel>> getDataSet)

    where TModel : Model, new()
Parameters
Type Name Description
DbTable<TModel> dbTable

The database table should be mocked.

System.Func<DataSet<TModel>> getDataSet

The delegate to return DataSet which contains the data.

Type Parameters
Name Description
TModel

Model type of the database table.

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