Show / Hide Table of Contents

Interface IBaseObjectDAL<T>

Describes basic functionality for an object that has admins and members.

Namespace: Microsoft.GNS.Roster.DataAccess
Assembly: Microsoft.GNS.Roster.DataAccess.dll
Syntax
public interface IBaseObjectDAL<T> where T : IRosterDocument
Type Parameters
Name Description
T

Methods

View Source

DeleteAsync(T)

Deletes the object.

Declaration
Task DeleteAsync(T obj)
Parameters
Type Name Description
T obj

The object to delete.

Returns
Type Description
Task

A task representing the work to delete the Org.

View Source

GetAllAsync(Scope)

Gets all objects in a scope.

Declaration
IAsyncEnumerable<T> GetAllAsync(Scope scope)
Parameters
Type Name Description
Scope scope

The object scope. May be ignored for static scope objects.

Returns
Type Description
IAsyncEnumerable<T>

An enumeration of all objects the current principal has access to.

View Source

GetByIdAsync(Guid, T?)

Gets an object by Id.

Declaration
Task<T?> GetByIdAsync(Guid id, T? notFoundDefault)
Parameters
Type Name Description
Guid id

The immutable object Id.

T notFoundDefault

A default value to return when the object is not found.

Returns
Type Description
Task<T>

The object or its empty object type.

View Source

GetByNameAsync(string, Scope, T?)

Gets an object by name.

Declaration
Task<T?> GetByNameAsync(string name, Scope scope, T? notFoundDefault)
Parameters
Type Name Description
string name

The object name.

Scope scope

The object scope. May be ignored for static scope objects.

T notFoundDefault

A default value to return when the object is not found.

Returns
Type Description
Task<T>

The object or its empty object type.

View Source

SaveAsync(T)

Saves the object.

Declaration
Task<T> SaveAsync(T obj)
Parameters
Type Name Description
T obj

The object to save.

Returns
Type Description
Task<T>

The object with its database persisted values.

  • View Source
In this article
Back to top Generated by DocFX