Lenguaje

RuntimePropertyBase.SetIndexedCollectionAccessor<TEntity,TCollection,TElement> Método

Definición

Se trata de una API interna que admite la infraestructura de Entity Framework Core y no está sujeta a los mismos estándares de compatibilidad que las API públicas. Se puede cambiar o quitar sin previo aviso en ninguna versión. Solo debe usarlo directamente en el código con extrema precaución y saber que hacerlo puede dar lugar a errores de aplicación al actualizar a una nueva versión de Entity Framework Core.

[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public virtual void SetIndexedCollectionAccessor<TEntity,TCollection,TElement>(Func<TEntity,int,TElement> get, Action<TEntity,int,TElement?> set, Action<TEntity,int,TElement?> setForMaterialization, Func<int,TCollection> createCollection) where TEntity : class where TCollection : class, System.Collections.Generic.IList<TElement> where TElement : class;
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
abstract member SetIndexedCollectionAccessor : Func<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Action<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Action<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Func<int, 'Collection (requires 'Collection : null and 'Collection :> System.Collections.Generic.IList<'Element>)> -> unit (requires 'Entity : null and 'Collection : null and 'Collection :> System.Collections.Generic.IList<'Element> and 'Element : null)
override this.SetIndexedCollectionAccessor : Func<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Action<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Action<'Entity, int, 'Element (requires 'Entity : null and 'Element : null)> * Func<int, 'Collection (requires 'Collection : null and 'Collection :> System.Collections.Generic.IList<'Element>)> -> unit (requires 'Entity : null and 'Collection : null and 'Collection :> System.Collections.Generic.IList<'Element> and 'Element : null)
Public Overridable Sub SetIndexedCollectionAccessor(Of TEntity As Class, TCollection As Class, TElement As Class) (get As Func(Of TEntity, Integer, TElement), set As Action(Of TEntity, Integer, TElement), setForMaterialization As Action(Of TEntity, Integer, TElement), createCollection As Func(Of Integer, TCollection))

Parámetros de tipo

TEntity
TCollection
TElement

Parámetros

get
Func<TEntity,Int32,TElement>
set
Action<TEntity,Int32,TElement>
setForMaterialization
Action<TEntity,Int32,TElement>
createCollection
Func<Int32,TCollection>
Atributos

Se aplica a