wwwlicious

My feedback

  1. 3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Feature Requests  ·  Flag idea as inappropriate…  ·  Admin →
    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
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Feature Requests  ·  Flag idea as inappropriate…  ·  Admin →
    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