public UpdatePlaceDto(PlaceDetailDto detail)
 {
     Id                        = detail.Id;
     Description               = detail.Description;
     Name                      = detail.Name;
     ParentPlaceId             = detail.ParentPlaceId;
     TemplateId                = detail.TemplateId;
     PlaceExtendedPropertyList = new List <WriteEntityExtendedPropertyDto>(detail.PlaceExtendedPropertyList);
 }
 public static UpdatePlaceDto FromPlaceDetail(PlaceDetailDto detail)
 {
     return(new UpdatePlaceDto
     {
         Description = detail.Description,
         Id = detail.Id,
         Name = detail.Name,
         PlaceExtendedPropertyList = new List <WriteEntityExtendedPropertyDto>(detail.PlaceExtendedPropertyList),
         ParentPlaceId = detail.ParentPlaceId,
         TemplateId = detail.TemplateId
     });
 }
Beispiel #3
0
        public PlaceDetailDto(PlaceDetailDto dto) : base(dto)
        {
            if (dto == null)
            {
                return;
            }

            var type       = typeof(PlaceDetailDto);
            var properties = type.GetTypeInfo().DeclaredProperties;

            foreach (var property in properties)
            {
                var value = property.GetValue(dto);
                property.SetValue(this, value);
            }
        }