GithubHelp home page GithubHelp logo

Optional expected version? about cqrslite HOT 5 CLOSED

gautema avatar gautema commented on July 27, 2024
Optional expected version?

from cqrslite.

Comments (5)

gautema avatar gautema commented on July 27, 2024

I must admit, I can't remember why ExpectedVersion is required there. I think it started together with a few other fields as required, and most of them have been removed since other users have needed versions without knowing Id and so on. I'll look a bit further into this tomorrow and see if the property is ready for being retired.

from cqrslite.

binarymash avatar binarymash commented on July 27, 2024

Well there are many use cases where it does makes sense to pass an expected version on the command, but as per your comment on #40 I think it shouldn't be a requirement. So I suppose the question is, should it be a nullable int on ICommand, or should it be up to the user to add it to their commands themselves if they need it? Looks like the code compiles if I comment out the property on ICommand, but as it's a common use case it might make sense to keep it on there but make it nullable.

Keep in mind that I don't really know what I'm doing with CQRS/ES so I might be talking rubbish :)

from cqrslite.

gautema avatar gautema commented on July 27, 2024

I agree that it shouldn't be required here since it's not required later in the chain. I think removing it will be the best, so existing users don't have to start casting or change their code in other ways.

from cqrslite.

binarymash avatar binarymash commented on July 27, 2024

Yeah, I think that's the best approach. I'll create a pull request.

from cqrslite.

binarymash avatar binarymash commented on July 27, 2024

Looks good in 0.21.0, thanks.

from cqrslite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.