Closed dalton5 closed 9 years ago
but it does not work.
Define "does not work". What doesn't work? I think your problem is you're missing the generic constraint where T : IEntity<TKey>
. So you should probably write something like:
public class CustomMongoRepository<T> : MongoRepository<T>
where T : IEntity<string> { }
Also, the Update()
method is, effectively, an AddOrUpdate
method.
Great. It works. Thanks.
Hi,
I would like to exetend the standard MongoRepository class. I try to inherit from
MongoRepository<t>
.public class CustomMongoRepository<T> : MongoRepository<T>{}
but it does not work.
Is it possible to do it?
I would like to add some standard methods such as AddOrUpdate(string key) ...
Thanks,