public void Remove(WallPost post) { if (Contains(post)) { OwnedPosts.Remove(Find(post)); } }
public void Add(WallPost post) { var model = DatabaseContext.Shared.PostReferences.Create(); model.PostId = post.PostId; model.Post = post; OwnedPosts.Add(model); }
private UserPostReference Find(WallPost model) { foreach (var wall in OwnedPosts) { if (wall.PostId == model.PostId) { return(wall); } } return(null); }
public void RemovePost(WallPost post) { Posts.Remove(post); post.Wall = null; post.WallId = null; }
public void AddPost(WallPost post) { post.Wall = this; post.WallId = this.WallUrl; Posts.Add(post); }
public bool Contains(WallPost post) { return(Find(post) != null); }