liquidprojections / LiquidProjections

Liquid Projections supports building and maintaining autonomous .NET projection code in an Event Sourcing architecture.
https://www.liquidprojections.net
MIT License
169 stars 25 forks source link

Improve fluent API for more flexibility #108

Closed dennisdoomen closed 6 years ago

dennisdoomen commented 6 years ago
Now Next
Map().As().When() Map().As()
Map().AsCreateOf().Using() Map().AsCreateOf().Using().ThrowingOnDuplicates()
Map().AsCreateIfDoesNotExistsOf().Using() Map().AsCreateOf().Using().IgnoringDuplicates()
Map().AsUpdateOf().Using().CreatingIfMissing()
  Map().AsCreateOf().Using().HandlingDuplicatesUsing(x => x.)
Map().AsCreateOrUpdateOf().Using() Map().AsCreateOf().Using().OverwritingDuplicates()
Map().AsUpdateOf().Using() Map().AsUpdateOf().Using().ThrowingIfMissing()
Map().AsUpdateIfExists().Using() Map().AsUpdateOf().Using().IgnoringMisses()
  Map().AsUpdateOf().Using().HandlingMissesUsing(x => x)
Map().AsDeleteOf().Using() Map().AsDeleteOf().Using().ThrowingIfMissing()
Map().AsDeleteIfExists().Using() Map().AsDeleteOf().Using().IgnoringMisses()
  Map().AsDeleteOf().Using().HandlingMissesUsing(x => x)
dennisdoomen commented 6 years ago

@tomachristian @IharBury

IharBury commented 6 years ago

Map().AsCreateIfDoesNotExistsOf().Using() can be potentially expressed not only as Map().AsCreateOf().Using().IgnoringDuplicates() but also as something like Map().AsUpdateOf().Using().CreatingIfMissing(). Do we want to support both or just force using the first one?

IharBury commented 6 years ago

I expect HandlingDuplicatesUsing(x => x.) to have the following supported paratemeters:

dennisdoomen commented 6 years ago

Do we want to support both or just force using the first one?

Maybe yes. It would allow consumers to emphasis the create or the update part.