Show / Hide Table of Contents

Interface IRef<T>

Generic contract used to define the type of properties referencing entities.

Inherited Members
IRef.Id
IRef.EntityType
IRef.IsEmpty
Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
public interface IRef<T> : IRef, IIdentifiable where T : class
Type Parameters
Name Description
T

The referenced entity type.

Properties

| Improve this Doc View Source

Entity

Gets or sets the referenced entity.

Declaration
T Entity { get; set; }
Property Value
Type Description
T

The referenced entity.

Remarks

The entity is not ensured to be set prior to calling GetAsync(Boolean, CancellationToken) due to performance reasons, but the actual behavior is left to the implementor.

Methods

| Improve this Doc View Source

GetAsync(Boolean, CancellationToken)

Gets the referenced entity asynchronously.

Declaration
Task<T> GetAsync(bool throwIfNotFound = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Boolean throwIfNotFound

If true and the referenced entity is not found, an exception occurs.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

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

A task promising the referenced entity.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX