-
Thanks, Jonny. That is helpful to know about version differences, although I was using the latest (4.5.10). But in the process of looking at what you were saying about the ClearRules method, I stumbled upon an error in my rule logic. Once I address that, it worked. Thanks, again.
-
To provide more information in case it is helpful, here is the "outer" or primary rule constructor: public Equal(IPropertyInfo primaryProperty, IComparable compareToValue, IBusinessRule innerRule) : base(primaryProperty) { CompareToVal = compareToValue; this.RuleUri.AddQueryParameter("compareToValue", compareToValue.ToString());
-
From what I can tell, it does (assuming I have done this properly). Here is the rule in my object: BusinessRules.AddRule(new Equal( PaymentTermNumberProperty , 10 , new GreaterThan(ExtendedDateProperty, DateTime.Today)) { MessageText = "Extended Date must be greater than Today when Payment Term is 'Tiered'" }); And here is what I see
-
I'm trying to work my way through a gateway rule. As I step through the Execute method of the Inner Rule , I can see the failure result added to the rule context. After being added, back in the gateway/outer rule I can then see that the RuleContext contains a count of 1 for the Results property. And that one RuleResult has its Severity property
-
How would I go about setting up a common rule (for instance - a MinLength rule) but only enforce it if the user populates the field with data. For instance, a fax number field isn't required, but if it is populated it must have a minimum length of 10. But as it stands currently, the MinLength rule fails if it isn't populated. Thanks.
-
I've always had the habit of defining a public constructor for my objects when being consumed by SL or WinRT, but I conditionally provide the private parameterless constructor for .NET projects. I'm consuming an object from an ASP.NET MVC project and I'm running into the "No parameterless constructor defined for this object" error
-
Not sure about where one method works or doesn't work, but I saw this example in Rocky's Using CSLA e-book a few times. Perhaps this is the preferred method? public static readonly PropertyInfo<string> NameProperty = RegisterProperty<string>(c => c.Name); [Display(Name = "Project name")] [Required] [StringLength(50)
-
If I remember right, this has something to do with which version of CSLA you have installed and which version of .NET you are using. You can do a search for AsyncTargetingPack on this forum and see a number of replies. Here is one that might be helpful describing the situation. http://forums.lhotka.net/forums/p/11716/54302.aspx#54302
-
If you download the latest version using the link I originally posted, there is a Samples directory in the zip file. There are a number of projects, but the one in particular that looks like your best bet is called "CslaMVC." It can be found through this path in the zip file contents: MarimerLLC-csla-V4-5-12-38-gf867ba7.zip\MarimerLLC-csla
-
Have you already created a WCF service? Or are you starting your project from scratch?