Skip to main content

Definition

Assembly: System.Runtime.dll Namespace: System.Collections.Generic

Syntax

System.Collections.Generic.IEnumerable<T> where T : CloudNimble.EasyAF.Core.DbObservableObject

Summary

This type is defined in System.Runtime.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

AcceptChanges Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Loops through the entries in a given IEnumerable`1 and accepts all current changes for each entry.

Syntax

public static void AcceptChanges<T>(System.Collections.Generic.IEnumerable<T> enumerable, bool goDeep = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
goDeepbool-

ChangedCount Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Int32 representing the number of objects in the enumerable that have changes.

Syntax

public static int ChangedCount<T>(System.Collections.Generic.IEnumerable<T> enumerable, bool checkGraph = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
checkGraphbool-

Returns

Type: int

ContainsId Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean if a list of Ids from the given IEnumerable`1 contains the specified value.

Syntax

public static bool ContainsId<T, TId>(System.Collections.Generic.IEnumerable<T> list, TId idValue) where T : class, CloudNimble.EasyAF.Core.IIdentifiable<TId> where TId : struct, System.ValueType

Parameters

NameTypeDescription
listSystem.Collections.Generic.IEnumerable<T>The List`1 to check for the given ID value.
idValueTIdThe value to check for.

Returns

Type: bool

ContentsAreChanged Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean if any DbObservableObject in the IEnumerable`1 has changes.

Syntax

public static bool ContentsAreChanged<T>(System.Collections.Generic.IEnumerable<T> enumerable, bool checkGraph = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
checkGraphbool-

Returns

Type: bool

ContentsAreChanged Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean if any DbObservableObject in the IEnumerable`1 has changes.

Syntax

public static bool ContentsAreChanged<T>(System.Collections.Generic.IEnumerable<T> enumerable, System.Func<T, bool> predicate, bool checkGraph = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
predicateSystem.Func<T, bool>-
checkGraphbool-

Returns

Type: bool

ContentsAreChanged Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean if any DbObservableObject in the IEnumerable`1 has changes.

Syntax

public static bool ContentsAreChanged<T, TForeign, TId>(System.Collections.Generic.IEnumerable<T> enumerable, System.Collections.Generic.IEnumerable<TForeign> foreignList, System.Func<T, TId> foreignIdFunc, bool checkGraph = false) where T : CloudNimble.EasyAF.Core.DbObservableObject, CloudNimble.EasyAF.Core.IIdentifiable<TId> where TForeign : CloudNimble.EasyAF.Core.DbObservableObject, CloudNimble.EasyAF.Core.IIdentifiable<TId> where TId : struct, System.ValueType

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
foreignListSystem.Collections.Generic.IEnumerable<TForeign>The list of related objects that we want to filter the enumerable down to.
foreignIdFuncSystem.Func<T, TId>The property from the enumerable that points to the Id for the objects in foreignList.
checkGraphbool-

Returns

Type: bool

FilterForChanges Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
For a given IEnumerable`1, filter down the result to the changed items in enumerable whose foreign keys appear in the foreignList.

Syntax

public static System.Collections.Generic.IEnumerable<T> FilterForChanges<T, TForeign, TId>(System.Collections.Generic.IEnumerable<T> enumerable, System.Collections.Generic.IEnumerable<TForeign> foreignList, System.Func<T, TId> foreignIdFunc) where T : CloudNimble.EasyAF.Core.DbObservableObject, CloudNimble.EasyAF.Core.IIdentifiable<TId> where TForeign : CloudNimble.EasyAF.Core.DbObservableObject, CloudNimble.EasyAF.Core.IIdentifiable<TId> where TId : struct, System.ValueType

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>The list we want to check for changes in.
foreignListSystem.Collections.Generic.IEnumerable<TForeign>The list of related objects that we want to filter the enumerable down to.
foreignIdFuncSystem.Func<T, TId>The property from the enumerable that points to the Id for the objects in foreignList.

Returns

Type: System.Collections.Generic.IEnumerable<T>

None Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean specifying whether or not the IEnumerable`1 has any items in it.

Syntax

public static bool None<T>(System.Collections.Generic.IEnumerable<T> source)

Parameters

NameTypeDescription
sourceSystem.Collections.Generic.IEnumerable<T>The IEnumerable`1 to check.

Returns

Type: bool

Type Parameters

None Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a Boolean specifying whether or not the IEnumerable`1 has any items in it.

Syntax

public static bool None<T>(System.Collections.Generic.IEnumerable<T> source, System.Func<T, bool> predicate)

Parameters

NameTypeDescription
sourceSystem.Collections.Generic.IEnumerable<T>The IEnumerable`1 to check.
predicateSystem.Func<T, bool>A set of additional parameters to check against.

Returns

Type: bool

Type Parameters

RejectChanges Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Loops through the entries in a given IEnumerable`1 and clears all current changes for each entry.

Syntax

public static void RejectChanges<T>(System.Collections.Generic.IEnumerable<T> enumerable, bool goDeep = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>-
goDeepbool-

ToTrackedList Extension

Extension method from System.Collections.Generic.EasyAF_IEnumerableExtensions
Returns a [List1](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1) where the [DbObservableObject](/api-reference/CloudNimble/EasyAF/Core/DbObservableObject)DbObservableObjects</see> have Boolean)` turned on.

Syntax

public static System.Collections.Generic.List<T> ToTrackedList<T>(System.Collections.Generic.IEnumerable<T> enumerable, bool deepTracking = false) where T : CloudNimble.EasyAF.Core.DbObservableObject

Parameters

NameTypeDescription
enumerableSystem.Collections.Generic.IEnumerable<T>The list of objects to turn change tracking on for.
deepTrackingbool-

Returns

Type: System.Collections.Generic.List<T>