/// <summary>
        /// Deletes the registration template placement placement group.
        /// </summary>
        /// <param name="registrationTemplatePlacement">The registration template placement.</param>
        /// <param name="group">The group.</param>
        /// <returns></returns>
        public bool DeleteRegistrationTemplatePlacementPlacementGroup(RegistrationTemplatePlacement registrationTemplatePlacement, Group group)
        {
            if (this.RelatedEntities.RelatedToSourceEntityAlreadyExists(registrationTemplatePlacement.Id, group, RelatedEntityPurposeKey.RegistrationTemplateGroupPlacementTemplate))
            {
                this.RelatedEntities.DeleteRelatedToSourceEntity(registrationTemplatePlacement.Id, group, RelatedEntityPurposeKey.RegistrationTemplateGroupPlacementTemplate);
                return(true);
            }

            return(false);
        }
 /// <summary>
 /// Clones this RegistrationTemplatePlacement object to a new RegistrationTemplatePlacement object
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="deepCopy">if set to <c>true</c> a deep copy is made. If false, only the basic entity properties are copied.</param>
 /// <returns></returns>
 public static RegistrationTemplatePlacement Clone(this RegistrationTemplatePlacement source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as RegistrationTemplatePlacement);
     }
     else
     {
         var target = new RegistrationTemplatePlacement();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
 /// <summary>
 /// Copies the properties from another RegistrationTemplatePlacement object to this RegistrationTemplatePlacement object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this RegistrationTemplatePlacement target, RegistrationTemplatePlacement source)
 {
     target.Id = source.Id;
     target.AllowMultiplePlacements = source.AllowMultiplePlacements;
     target.Cost                    = source.Cost;
     target.ForeignGuid             = source.ForeignGuid;
     target.ForeignKey              = source.ForeignKey;
     target.GroupTypeId             = source.GroupTypeId;
     target.IconCssClass            = source.IconCssClass;
     target.IsInternal              = source.IsInternal;
     target.Name                    = source.Name;
     target.Order                   = source.Order;
     target.RegistrationTemplateId  = source.RegistrationTemplateId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
 /// <summary>
 /// Sets the RegistrationTemplatePlacement placement groups
 /// </summary>
 /// <param name="registrationTemplatePlacement">The registration template placement.</param>
 /// <param name="groups">The groups.</param>
 public void SetRegistrationTemplatePlacementPlacementGroups(RegistrationTemplatePlacement registrationTemplatePlacement, List <Group> groups)
 {
     this.RelatedEntities.SetRelatedToSourceEntity(registrationTemplatePlacement.Id, groups, RelatedEntityPurposeKey.RegistrationTemplateGroupPlacementTemplate);
 }
 /// <summary>
 /// Gets the replacement groups for a specific RegistrationTemplatePlacement
 /// </summary>
 /// <param name="registrationTemplatePlacement">The registration template placement.</param>
 /// <returns></returns>
 public IQueryable <Group> GetRegistrationTemplatePlacementPlacementGroups(RegistrationTemplatePlacement registrationTemplatePlacement)
 {
     return(this.RelatedEntities.GetRelatedToSourceEntity <Group>(registrationTemplatePlacement.Id, RelatedEntityPurposeKey.RegistrationTemplateGroupPlacementTemplate));
 }