diff --git a/LiteDB/Client/Database/ILiteRepository.cs b/LiteDB/Client/Database/ILiteRepository.cs
index 913cbbec8..92862d4c9 100644
--- a/LiteDB/Client/Database/ILiteRepository.cs
+++ b/LiteDB/Client/Database/ILiteRepository.cs
@@ -14,7 +14,7 @@ public interface ILiteRepository : IDisposable
///
/// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
///
- void Insert(T entity, string collectionName = null);
+ BsonValue Insert(T entity, string collectionName = null);
///
/// Insert an array of new documents into collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
diff --git a/LiteDB/Client/Database/LiteRepository.cs b/LiteDB/Client/Database/LiteRepository.cs
index 0f7e67f1b..91a659bef 100644
--- a/LiteDB/Client/Database/LiteRepository.cs
+++ b/LiteDB/Client/Database/LiteRepository.cs
@@ -64,9 +64,9 @@ public LiteRepository(Stream stream, BsonMapper mapper = null, Stream logStream
///
/// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
///
- public void Insert(T entity, string collectionName = null)
+ public BsonValue Insert(T entity, string collectionName = null)
{
- _db.GetCollection(collectionName).Insert(entity);
+ return _db.GetCollection(collectionName).Insert(entity);
}
///