nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / IRepositoryRead

IRepositoryRead

Full name Microsoft.VisualBasic.ComponentModel.DataSourceModel.Repository.IRepositoryRead`2 Assembly Microsoft.VisualBasic.Runtime Members 4

Interface to support reading entities from the backing store

00 Remarks

In this architecture there is a seperate read and write interface but often this pattern has just the one interface for both functions

Type Parameters
NameDescription
TEntity

The key-identified type of entity we are reading

TKey

The type of the key

01 Syntax

Microsoft.VisualBasic.ComponentModel.DataSourceModel.Repository.IRepositoryRead`2

02 Methods

NameOverloadsSummary
Exists 1 Does a record exist in the repository identified by this key
GetByKey 1 Get the entity uniquely identified by the given key
GetWhere 1 Get a set of entities from the repository that match the where clause
GetAll 1 Get all of this type of thing from the repository

03 Members

method Exists #
Exists(`0)

Does a record exist in the repository identified by this key

Parameters
NameTypeDescription
key`0

The unique identifier of the entity we are looking for

method GetByKey #
GetByKey(`0)

Get the entity uniquely identified by the given key

Parameters
NameTypeDescription
key`0

The unique identifier to use to get the entity

method GetWhere #
GetWhere(Func(Of `1, Boolean))

Get a set of entities from the repository that match the where clause

Parameters
NameTypeDescription
clauseFunc(Of `1, Boolean)

A function to apply to filter the results from the repository

method GetAll #
GetAll

Get all of this type of thing from the repository

Remarks

returns an IQueryable so this request can be filtered further