Exemple #1
0
 public Post[] GetAll()
 {
     var collection = new Post[posts.Count()];
     int i = 0;
     foreach (Post post in posts)
     {
         collection[i] = post;
         i++;
     }
     return collection;
 }
 public void Add(Post post)
 {
     FakeDb.Add(post);
 }
 public void Delete(Post post)
 {
     posts.Remove(post);
 }
 public void Add(Post post)
 {
     posts.Add(post);
 }
 public void Delete(Post post)
 {
     FakeDb.Delete(post);
 }