private void AddSite(Model.Site item)
 {
     Add(
         new Owner
     {
         Item = item,
         AuthenticationProfiles = new ObservableCollection <Model.AuthenticationProfile>
                                  (
             Model.Context.Current.AuthenticationProfiles.Where(x => x.ParentId == item.Id)
                                  )
     }
         );
 }
        private void RemoveSite(Model.Site item)
        {
            var toRemove = this
                           .SingleOrDefault(x => typeof(Model.Site)
                                            .IsAssignableFrom(x.Item.GetType()) && (x.Item as Model.Site).Id == item.Id);

            // The site wasn't found. This is normal since the site removal can be recursive.
            if (toRemove == null)
            {
                return;
            }

            Remove(toRemove);
        }
示例#3
0
        public override void LoadFromEntity(Model.Site entity)
        {
            base.LoadFromEntity(entity);

            Name = entity.Name;
        }
示例#4
0
        public override void LoadFromEntity(Model.Site entity, IMapper mapper)
        {
            base.LoadFromEntity(entity, mapper);

            Name = entity.Name;
        }
示例#5
0
 public bool Delete(Model.Site entity)
 {
     throw new NotImplementedException();
 }