CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Search

  • Re: Handling Read-Only Info Properties in Business Objects

    Jonny, First, your thoughts are excellent and I appreciate you sharing them with me. You have certainly inspired my thinking on this. I'll respond now to your last post: 1. With all due respect I would not call these business rules. In my mind these are behaviors that the BO must perform in response to an action (in this case a property being set
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Wed, Dec 15 2010
  • Re: Handling Read-Only Info Properties in Business Objects

    Thanks for the post Jonny. I've had to think about this a bit and I'm not sure I'm on board with the solution for a couple of reasons: 1. Using a business rule to perform some basic data mapping seems like an inappropriate use of "rules". I'm not sure if Rocky intended out values to be used in this way. It's clever, but
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Wed, Dec 15 2010
  • Handling Read-Only Info Properties in Business Objects

    This is part question and hopefully part discussion. I've been developing business objects using CSLA for many years and frequently come across the need to include what I would describe as read-only info properties on a business object. Let me give a quick example. Say you have a Customer class and a CustomerType class. The CustomerType defines
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Wed, Dec 1 2010
  • BO Properties : What Would You Do?

    I'd like to get some opinions on how to handle the following situation. I have a property on a Customer object called StateCode. This is a string that establishes the US state for a customer (eg, NY). I also want to have a property on Customer called StateName that returns the full name of the state (in my example, New York). This would be a read
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Thu, Aug 12 2010
  • Re: Save Method Override Not Called

    The reason I need to override Save is because I need to remove some items from a child collection first. It's very domain-specific. I'm working with an Order and OrderDetail objects and the OrderDetails collection is pre-populated with data from a set of customer preferences - products the customer usually orders. When a new order is created
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Mon, Jun 21 2010
  • Re: Save Method Override Not Called

    Here's the code from, yes, CSLA 4 Beta, Csla.BusinessBase<T>: public virtual T Save() { T result; if ( this .IsChild) throw new NotSupportedException ( Resources .NoSaveChildException); if (EditLevel > 0) throw new Rules. ValidationException ( Resources .NoSaveEditingException); if (!IsValid && !IsDeleted) throw new Rules. ValidationException
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Mon, Jun 21 2010
  • Save Method Override Not Called

    Csla..BusinessBase has a virtual Save method that I'm overriding in a class in order to perform some actions before the Save is executed. However, my overrided Save method is not being called. I'm using the ViewModelBase class from the Csla.Xaml namespace for my "Order" class. I called the Save method of ViewModel<T> which in
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Mon, Jun 21 2010
  • Re: Business Rule Testability

    I agree testing in isolation is a non-issue. I was simply stating that I do not want to test the business rules through a business object. What I'd like to see is a way to inject a RuleContext into the Execute method. This could be accomplished by providing a public IRuleContext interface from which I can build a mock / stub / double to inject into
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Sat, Jun 19 2010
  • Business Rule Testability

    I'd like to be able to write unit tests for the custom business rules I create so that I can verify the rules work as expected without having to test them through a business object that uses them. RuleContext does not have a public constructor and there is no interface that can be implemented in a test harness class to provide the context for the
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Fri, Jun 18 2010
  • Re: InputProperties property not initialized in base class

    I agree that it's unnecessary to initialize the collection for every rule. However, I don't like the fact that a property from a base class throws a NullReference exception if I try to use it, especially for collections. I believe it's more natural and less error-prone to return an empty list. Might I suggest that a better approach would
    Posted to CSLA .NET discussion (Forum) by Dave Kehring on Fri, Jun 18 2010
Page 1 of 3 (22 items) 1 2 3 Next > | More Search Options

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems