CSLA .NET

From Rockford Lhotka's Expert C# 2005 and VB 2005 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

How do you get info back from Command object?

Last post 05-22-2008, 9:17 AM by dtabako. 2 replies.
Sort Posts: Previous Next
  •  05-21-2008, 10:56 AM 23720

    How do you get info back from Command object?

    The way I can think of is to create a return object that contains properties for all the info you want to return (such as Result, Message, etc.). Then have the Execute() method return that object. Is that the way it's supposed to be done? Is there a better way? I have read on these forums that one of the reasons for using a Command object is so that you can get some info back. So I assume there is a generally accepted way of doing that. I'm sure I could get it working with my return object but I want to make sure I'm following "best practices" as much as possible.

    Thanks,

    Dennis

  •  05-21-2008, 12:31 PM 23721 in reply to 23720

    Re: How do you get info back from Command object?

    Typically we use properties of the command object itself.  The object's serializable.

  •  05-22-2008, 9:17 AM 23743 in reply to 23721

    Re: How do you get info back from Command object?

    So then you would create a Command object that you can instantiate, rather than a static one?
View as RSS news feed in XML

Please contact Magenic for your .NET consulting and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems