Skip to content

Commit af876e2

Browse files
Merge pull request #69 from nullinside-development-group/feat/expose
feat: exposing entity method
2 parents de65b39 + affe196 commit af876e2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Nullinside.Api.Model/INullinsideContext.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore.ChangeTracking;
23
using Microsoft.EntityFrameworkCore.Infrastructure;
34

45
using Nullinside.Api.Model.Ddl;
@@ -76,4 +77,23 @@ public interface INullinsideContext : IAsyncDisposable {
7677
/// The number of state entries written to the database.
7778
/// </returns>
7879
int SaveChanges();
80+
81+
/// <summary>
82+
/// Gets an <see cref="EntityEntry" /> for the given entity. The entry provides
83+
/// access to change tracking information and operations for the entity.
84+
/// </summary>
85+
/// <remarks>
86+
/// <para>
87+
/// This method may be called on an entity that is not tracked. You can then
88+
/// set the <see cref="EntityEntry.State" /> property on the returned entry
89+
/// to have the context begin tracking the entity in the specified state.
90+
/// </para>
91+
/// <para>
92+
/// See <see href="https://aka.ms/efcore-docs-entity-entries">Accessing tracked entities in EF Core</see> for more information and
93+
/// examples.
94+
/// </para>
95+
/// </remarks>
96+
/// <param name="entity">The entity to get the entry for.</param>
97+
/// <returns>The entry for the given entity.</returns>
98+
EntityEntry Entry(object entity);
7999
}

0 commit comments

Comments
 (0)