Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change return type of ILiteRepository.Insert to match ILiteDatabase.Insert #2260

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LiteDB/Client/Database/ILiteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface ILiteRepository : IDisposable
/// <summary>
/// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
/// </summary>
void Insert<T>(T entity, string collectionName = null);
BsonValue Insert<T>(T entity, string collectionName = null);

/// <summary>
/// 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
Expand Down
4 changes: 2 additions & 2 deletions LiteDB/Client/Database/LiteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public LiteRepository(Stream stream, BsonMapper mapper = null, Stream logStream
/// <summary>
/// Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
/// </summary>
public void Insert<T>(T entity, string collectionName = null)
public BsonValue Insert<T>(T entity, string collectionName = null)
{
_db.GetCollection<T>(collectionName).Insert(entity);
return _db.GetCollection<T>(collectionName).Insert(entity);
}

/// <summary>
Expand Down