gautema/CQRSlite

Read model handlers registration in Sample code

jk1980 opened this issue · 2 comments

Hi,

I'm a little bit confusion. I will try to use read model form sample code in my application, but there seems to be a problem with read model handlers:

  • InventoryItemDetailView.cs
  • InventoryListView.cs

They are not registered as proper event handlers in service collection.
It's that true or maybe I do something wrong?

Best regards and thank you for help

Hi. Sorry for the late reply, but I've been on vacation for a few days

The read models are registered automatically in the startup.cs line 59. This takes all handlers in the assembly and registers them. Does the sample not work for you?

Hi, thank you for your answer. It's working now. Problem was because I have ReadModel and WriteModel in different projects with different assemblies.
Regards and thank you once again.