/// <summary>Creates a new, empty CustomerDemographicEntity object.</summary> /// <returns>A new, empty CustomerDemographicEntity object.</returns> public override IEntity Create() { IEntity toReturn = new CustomerDemographicEntity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewCustomerDemographic // __LLBLGENPRO_USER_CODE_REGION_END return(toReturn); }
public static CustomerDemographic RelatedObject(this CustomerDemographicEntity entity, Hashtable seenObjects, Hashtable parents) { if (null == entity) { return(null); } if (seenObjects.Contains(entity)) { if (parents.Contains(entity)) { // avoid cyclic references return(null); } else { return(seenObjects[entity] as CustomerDemographic); } } return(entity.ToDto(seenObjects, parents)); }
public static CustomerDemographicEntity FromDto(this CustomerDemographic dto) { OnBeforeDtoToEntity(dto); var entity = new CustomerDemographicEntity(); // Map entity properties entity.CustomerTypeId = dto.CustomerTypeId; entity.CustomerDesc = dto.CustomerDesc; // Map entity associations // 1:n CustomerCustomerDemos association if (dto.CustomerCustomerDemos != null && dto.CustomerCustomerDemos.Any()) { foreach (var relatedDto in dto.CustomerCustomerDemos) { entity.CustomerCustomerDemos.Add(relatedDto.FromDto()); } } OnAfterDtoToEntity(dto, entity); return(entity); }
public static CustomerDemographic ToDto(this CustomerDemographicEntity entity) { return(entity.ToDto(new Hashtable(), new Hashtable())); }
static partial void OnAfterDtoToEntity(CustomerDemographic dto, CustomerDemographicEntity entity);
static partial void OnAfterEntityToDto(CustomerDemographicEntity entity, Hashtable seenObjects, Hashtable parents, CustomerDemographic dto);
static partial void OnBeforeEntityToDto(CustomerDemographicEntity entity, Hashtable seenObjects, Hashtable parents);