BabelDbContextExtensions
Namespace: Babel.Data Assembly: Babel.Data.dll
A babel database context extensions.
public static class BabelDbContextExtensionsInheritance
object ← BabelDbContextExtensions
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Exists<T>(BabelDbContext, T)
An extension method that determine if an entity is in the local view.
public static bool Exists<T>(this BabelDbContext context, T entity) where T : classParameters
context BabelDbContext
The context to act on.
entity T
The entity.
Returns
True if it succeeds, false if it fails.
Type Parameters
T
Generic type parameter.
IsAttached<T>(BabelDbContext, T)
An extension method that query if an entity is attached.
public static bool IsAttached<T>(this BabelDbContext context, T entry) where T : classParameters
context BabelDbContext
The context to act on.
entry T
The entry.
Returns
True if the entry is attached, false if not.
Type Parameters
T
Generic type parameter.
IsDetached<T>(BabelDbContext, T)
An extension method that query an entity is detached.
public static bool IsDetached<T>(this BabelDbContext context, T entry) where T : classParameters
context BabelDbContext
The context to act on.
entry T
The entry.
Returns
True if the entry is detached, false if not.
Type Parameters
T
Generic type parameter.
TryAttach<T>(BabelDbContext, DbSet<T>, T)
An extension method that attempts to attach.
public static bool TryAttach<T>(this BabelDbContext context, DbSet<T> collection, T entry) where T : classParameters
Returns
True if it succeeds, false if it fails.
Type Parameters
T
Generic type parameter.
Last updated