FuturistiCoder / LiteDB.Realtime

A LiteDB with realtime notifications
MIT License
43 stars 10 forks source link

Add `Collection<T>()` (use default name) #9

Closed jfoshee closed 1 year ago

jfoshee commented 1 year ago

Would it be possible to add an implementation of ISubscriptionBuilder.Collection<T>() that does not require an argument?

In that case just use the default name for the collection based on the type T?

In the mean time I find myself doing this:

// HACK: Get the collection name which is required by Realtime.Collection
var collectionName = database.GetCollection<T>().Name;
var observable = database.Realtime.Collection<T>(collectionName);

Thanks!

FuturistiCoder commented 1 year ago

Thanks for your suggestion. Fixed in v1.1.1