コード例 #1
0
        public CustomerDepartmentDTO(CustomerDepartment entity)
        {
            Id             = entity.Id;
            DepartmentName = entity.DepartmentName;
            CustomerId     = entity.CustomerId;

            Initiliazing(entity);
        }
コード例 #2
0
        public virtual CustomerDepartment ToCustomerDepartment()
        {
            var entity = new CustomerDepartment();

            entity.Id             = Id;
            entity.DepartmentName = DepartmentName;
            entity.CustomerId     = CustomerId;

            Converting(entity);

            return(entity);
        }
コード例 #3
0
        /// <summary>
        /// Clones all properties in a new CustomerDepartment instance,
        /// except PrimaryKey(s)
        /// </summary>
        /// <returns>New CustomerDepartment instance</returns>
        public CustomerDepartment Clone()
        {
            var clone = new CustomerDepartment();

            clone.DepartmentName = DepartmentName;
            clone.CustomerId     = CustomerId;
            clone.ModifyNr       = ModifyNr;
            clone.ModifyDate     = ModifyDate;
            clone.ModifierId     = ModifierId;
            clone.ModifierIp     = ModifierIp;
            clone.CreateDate     = CreateDate;
            clone.CreatorId      = CreatorId;
            clone.CreatorIp      = CreatorIp;

            Cloning(clone);

            return(clone);
        }
コード例 #4
0
 // Use below function in a partial class file (eg. CustomerDepartment.part.cs)
 // to add more complexity to clone
 partial void Cloning(CustomerDepartment clone);
コード例 #5
0
 partial void Converting(CustomerDepartment entity);
コード例 #6
0
 partial void Initiliazing(CustomerDepartment entity);