public CustomerDepartmentDTO(CustomerDepartment entity) { Id = entity.Id; DepartmentName = entity.DepartmentName; CustomerId = entity.CustomerId; Initiliazing(entity); }
public virtual CustomerDepartment ToCustomerDepartment() { var entity = new CustomerDepartment(); entity.Id = Id; entity.DepartmentName = DepartmentName; entity.CustomerId = CustomerId; Converting(entity); return(entity); }
/// <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); }
// Use below function in a partial class file (eg. CustomerDepartment.part.cs) // to add more complexity to clone partial void Cloning(CustomerDepartment clone);
partial void Converting(CustomerDepartment entity);
partial void Initiliazing(CustomerDepartment entity);