I would like to use a Clean Architecture approach in my .NET Core Service - particularly, separate my entities and aggregates from CouchDocument models.
If I understood correctly, then I should do the following:
Can this be done? Or is there a better approach? And where is it better to implement specifications to obtain filtered data, in a custom CouchDbRepository or through expression mapping?
Using the repository pattern to decouple domain and application logic from specific storage technologies is a quite common approach in Clean Architecture.
So yes, your proposal seems reasonable. To not violate the dependency rule of CA the repository interface should be in the application layer and the repository implementation in the frameworks or I/O layer.
For a more detailed discussion on how to implement repository pattern correctly in CA, pls also see: https://youtu.be/pfhDO_hZixw