public Solutions Create(Solutions solution) { _validator.ValidateAndThrowEx(solution, ruleSet: nameof(ISolutionsLogic.Create)); _modifier.ForCreate(solution); return(_datastore.Create(solution)); }
public void MustBeValidSolution() { RuleFor(x => x.Solution) .Must(soln => { _solutionsValidator.ValidateAndThrowEx(soln, ruleSet: nameof(ISolutionsLogic.Update)); return(true); }); }