Skip to content

Commit

Permalink
Add CommitAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
cwetanow committed Apr 5, 2017
1 parent afd4a96 commit 8129185
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Logs.Data/Contracts/IUnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ namespace Logs.Data.Contracts
public interface IUnitOfWork
{
void Commit();

void CommitAsync();
}
}
5 changes: 5 additions & 0 deletions src/Logs.Data/UnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ public void Commit()
{
this.dbContext.SaveChanges();
}

public async void CommitAsync()
{
await this.dbContext.SaveChangesAsync();
}
}
}

0 comments on commit 8129185

Please sign in to comment.