Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

DataPortal_Create

$
0
0

I am trying to code a unit test for one of our business objects but I had a question about the way I am calling the dataprotal create method.  Here is a code snippets.  Should I not use a criteria class?  It passes in another business object that is inherited form the csla framework.

         [Serializable()]
        private class Criteria
        {
            public string RecordNo = string.Empty;
            public Person LoggedInPerson;
            public Criteria(string recordNo, Person LoggedInPerson)
            {
                this.RecordNo = recordNo;
                LoggedInPerson = LoggedInPerson;
            }
        }

        [RunLocal()]
        protected void DataPortal_Create(object criteria)
        {
            Criteria crit = (Criteria)criteria;

            //...

            ValidationRules.CheckRules();

        }


Viewing all articles
Browse latest Browse all 764

Trending Articles