any chance you'd be interested in doing this in F# also? It seems there's a lot of code that on the surface (I have zero experience, but guessing) that a lot of the code is completely unnecessary with F#.
For example based on my understanding of Cqrs as it would be used in F#, you could define the aggregate type as follows:
type Aggregate<'t> = {Id:Guid;EventsLoaded:int; Data:'t;}
with member x.ApplyEvent(fEvent) : Aggregate<'t> * _ list = fEvent x |> (fun (a,events) -> {a with EventsLoaded = Seq.length events + a.EventsLoaded},events)
pardon my intrusion if you aren't into F#, but if you are, I'd love feedback on my interpretation and attempt at application of your example into my preferred language.
any chance you'd be interested in doing this in F# also? It seems there's a lot of code that on the surface (I have zero experience, but guessing) that a lot of the code is completely unnecessary with F#.
For example based on my understanding of Cqrs as it would be used in F#, you could define the aggregate type as follows:
pardon my intrusion if you aren't into F#, but if you are, I'd love feedback on my interpretation and attempt at application of your example into my preferred language.