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); }
public override void LoadFromEntity(Model.Site entity) { base.LoadFromEntity(entity); Name = entity.Name; }
public override void LoadFromEntity(Model.Site entity, IMapper mapper) { base.LoadFromEntity(entity, mapper); Name = entity.Name; }
public bool Delete(Model.Site entity) { throw new NotImplementedException(); }