Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:31
    oskardudycz labeled #2409
  • 16:31
    oskardudycz labeled #2409
  • 16:31
    oskardudycz labeled #2409
  • 16:31
    oskardudycz labeled #2409
  • 16:31
    oskardudycz labeled #2409
  • 16:31
    oskardudycz labeled #2409
  • 16:30
    oskardudycz review_requested #2409
  • 16:30
    oskardudycz review_requested #2409
  • 16:30
    oskardudycz review_requested #2409
  • 16:30
    oskardudycz review_requested #2409
  • 16:30
    oskardudycz commented #2409
  • 16:30
    oskardudycz commented #2409
  • 16:22
    oskardudycz closed #2406
  • 16:22
    oskardudycz closed #2406
  • 16:22

    oskardudycz on master

    Fixed xml doc comments for Proj… (compare)

  • 16:22

    oskardudycz on master

    Fixed xml doc comments for Proj… (compare)

  • 16:22
    oskardudycz commented #2406
  • 16:22
    oskardudycz commented #2406
  • 16:21
    oskardudycz synchronize #2406
  • 16:21
    oskardudycz synchronize #2406
Jeremy D. Miller
@jeremydmiller
@chathamcoders_twitter Even without us doing any kind of syntactical sugar, you can happily do Query<T>().AnyAsync(x => x.Id == id)
Willem Meints
@wmeints
Hey @oskardudycz Thanks for the nice talk on Youtube about Marten. Very informative and fun to watch :D
Oskar Dudycz
@oskardudycz
Thanks, Willem, for the feedback! Happy that you like it 🙂 I saw your comment on the Youtube video and answered it, but as an added link, there Youtube spam filters blocked me 🤷‍♂️
I linked the self-paced kit exercise showing different flours of handling domain logic with Marten https://github.com/oskardudycz/EventSourcing.NetCore/tree/main/Workshops/IntroductionToEventSourcing/08-BusinessLogic.Marten 🙂
Willem Meints
@wmeints
Kewl! I'm using some of the tricks with records in projections that you showed. Makes it more readable :D
Oskar Dudycz
@oskardudycz
Yeah, I like that it’s so self-explanatory. In projections (compared to aggregation) you get less performance penalty
Willem Meints
@wmeints
The only thing that still has me pondering is this: What if I want to call other dependencies (especially scoped ones) from a projection? Is that a thing?
Willem Meints
@wmeints
Doesn't look too bad. Thanks for sharing :-)
Oskar Dudycz
@oskardudycz
Best to probably inject factory Func<YourDependency> doing the scope creation and resolution
from ServiceProvider
Although it’s best to be careful and avoid such need ;)
Willem Meints
@wmeints
Yeah, that's what I'm thinking as well. There are better, more visible spots, to do these kinds of things. The less magic, the better.
Oskar Dudycz
@oskardudycz
I tried to do that in the past, even introducing syntactic sugar on top of it in Marten as one of my first PRs, but at some point dropped using it ;)
Using external dependencies introduced deterministic behaviours and performance degradation in our case.
Of course, sometimes it’s right and justified, but it better double-check if it’s really needed.
Phillip Haydon
@phillip-haydon
thanks for the recordings @oskardudycz, plan to watch tomorrow, my daughter was born yesterday so in hospital with wife with a bit of free time
Oskar Dudycz
@oskardudycz
Congratulations Phillip! I hope that's all fine :)
Jeremy D. Miller
@jeremydmiller
Oh wow, congrats Phillip! Hope everybody is doing well
Babu Annamalai
@mysticmind
Congrats @phillip-haydon!
Jeremy D. Miller
@jeremydmiller
@oskardudycz @mysticmind I'm piddling around w/ minor document updates today and maybe this weekend. The newish FetchForWriting() functionality? Would you all rather have that added to the existing appending web page, or an all new page?
I'm leaning toward an all new page that's dedicated to handling CQRS commands, but I'd be very happy to have any suggestions for what that page would even be called
Phillip Haydon
@phillip-haydon
Thanks. Mum and baby are doing really well.
Oskar Dudycz
@oskardudycz
Great Phillip, keeping fingers crossed 🤞 once again congrats!
@jeremydmiller, I’d also vote for a dedicated page. I’m not sure if it has to be named CQRS. To not make some people defensive, maybe “Handling Business Logic” would be better and then inside mention CQRS.
Babu Annamalai
@mysticmind
@jeremydmiller if we have it in a separate page, discovery is going to be a problem since it is not cohesively in one place. I would suggest to add to to appending itself. Thoughts?
Just re-looking, alternative is to put it in https://martendb.io/scenarios/aggregates-events-repositories.html where we are talking about different scenarios. So this could be in a scenario based explanation.
in addition, put it under appending as well for each method. Also a a link to a section in the above mentioned page with a short explanation.
Probably, the above is better...
Phillip Haydon
@phillip-haydon
repositories bad!
Babu Annamalai
@mysticmind
I meant to add a scenarios page for using FetchForWriting()
Babu Annamalai
@mysticmind
@jeremydmiller PR's JasperFx/marten#2322 (merged recently) and JasperFx/marten#2310 look to be related. Possibly, we can close #2310 as well?
Simon Lovely
@slovely
Hi all, I've watched the great videos last week by Jeremy and Oskar, and had a quick play with the event sourcing stuff. I'm missing something fundamental in how projections work though, and wonder if anyone would be able to spare 10 mins to tell me what I'm doing wrong. I think everything needed to repro is here: https://gist.github.com/slovely/ee50e8ffb318d604473ed66c585d17b5
Basically, I've created a couple of events and have a SelfAggregating projection, but only the most recent event seems to be reflected in the projection. See the comment on the gist for the full repro steps. My understanding could be wrong, but I thought that the projection would contain the latest state of all the events.
Thanks very much,
Simon
Jeremy D. Miller
@jeremydmiller
@mysticmind Yeah, I didn’t notice that the PR came in with the fix before I dealt with that. The fix I did is more generic and should go forward. I thought we could take in his test code as another regression at least. I just didn’t get around to doing the merging yet
1 reply
Oskar Dudycz
@oskardudycz
Hey Simon, I apologise for the delay in answering you on Twitter; I’ll try to do that later today.
Jeremy D. Miller
@jeremydmiller
@slovely You’re wiping the data in the database between tests is the first thing: https://gist.github.com/slovely/ee50e8ffb318d604473ed66c585d17b5#file-marteneventstoretests-cs-L33
Simon Lovely
@slovely
No worries Oskar - it's free help, you are under no obligation :)
@jeremydmiller I'm not re-running that test though, just running specific ones.
But I could definitely be doing something wrong!
Jeremy D. Miller
@jeremydmiller
@slovely Can you be a little more specific about what is not working? A failing test would be best. You’re not doing anything that isn’t straight forward
Simon Lovely
@slovely
Sure, let me try and amalgamate that all into a single test. It's definitely going to be me doing something wrong :)
Simon Lovely
@slovely
@jeremydmiller @oskardudycz OK doing that has lead me to discovering the issue! (should have explained it to a rubber duck first!). The problem is resolved if I change the properties on the projection to not have a private setter. I shouldn't have assumed that Marten would use reflection!
Oskar Dudycz
@oskardudycz
Thanks for follow up 👍 Check also https://martendb.io/configuration/json.html
You can set the private members handling options also to allow private ones.
The important thing is I have a field named Id with getter and setter
Simon Lovely
@slovely
Thanks - using _.UseDefaultSerialization(nonPublicMembersStorage: NonPublicMembersStorage.NonPublicSetters); also fixes it (as did init properties too). All makes perfect sense, knew it would be something straightforward!
Appreciate the help guys!
Oskar Dudycz
@oskardudycz
Happy to help 👍