Skip to content

wwwlicious

My feedback

2 results found

  1. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    wwwlicious commented  · 

    We have a plugin for consul, a distributed k/v store that allows you to change servicestack configuration at runtime

    https://github.com/MacLeanElectrical/servicestack-configuration-consul

    Hope this helps

  2. 4 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    wwwlicious commented  · 

    The way this is recommended to be handled in FluentValidator is to create a custom base class

    public abstract class AbstactSharedPropertyValidator : AbstractValidator<IHaveSharedProperty>

    Then implement this for each DTO where applicable.This avoids potential ordering issues with cascading rules and knowing which should be applied first. It is for this reason that validation is usually explicit to the concrete implementation.

    public class MessageWithSharedProperyValidator : AbstactSharedPropertyValidator <MessageWithSharedProperty>

    Whilst you still have to create validators for each concrete class, you can avoid duplicating validation logic in them by putting it in the base class.

    Hope that helps.

Feedback and Knowledge Base