示例#1
0
        ///<summary>
        /// A simple factory method to create a new <see cref="EvlBehavior"/> instance.
        ///</summary>
        ///<param name="_subject"></param>
        ///<param name="_catelogId"></param>
        ///<param name="_weight"></param>
        ///<param name="_modelId"></param>
        public static EvlBehavior CreateEvlBehavior(System.String _subject, System.Int32?_catelogId, System.Decimal?_weight,
                                                    System.Int32?_modelId)
        {
            EvlBehavior newEvlBehavior = new EvlBehavior();

            newEvlBehavior.Subject   = _subject;
            newEvlBehavior.CatelogId = _catelogId;
            newEvlBehavior.Weight    = _weight;
            newEvlBehavior.ModelId   = _modelId;
            return(newEvlBehavior);
        }
示例#2
0
        ///<summary>
        ///  Returns a Typed EvlBehavior Entity
        ///</summary>
        protected virtual EvlBehavior Copy(IDictionary existingCopies)
        {
            if (existingCopies == null)
            {
                // This is the root of the tree to be copied!
                existingCopies = new Hashtable();
            }

            //shallow copy entity
            EvlBehavior copy = new EvlBehavior();

            existingCopies.Add(this, copy);
            copy.SuppressEntityEvents = true;
            copy.Id        = this.Id;
            copy.Subject   = this.Subject;
            copy.CatelogId = this.CatelogId;
            copy.Weight    = this.Weight;
            copy.ModelId   = this.ModelId;


            copy.EntityState          = this.EntityState;
            copy.SuppressEntityEvents = false;
            return(copy);
        }