public void Update(Friend friend)
 {
     var existingFriend = Get(friend.Id);
     existingFriend.Blog = friend.Blog;
     existingFriend.Avatar = friend.Avatar;
     existingFriend.Email = friend.Email;
     existingFriend.FullName = friend.FullName;
 }
 public static Friend ToFriend(this Template template, int id = 0) {
     var friend = new Friend();
     friend.FullName = template.Data.GetDataByName("name").Value;
     friend.Email = template.Data.GetDataByName("email").Value;
     friend.Blog = new Uri(template.Data.GetDataByName("blog").Value);
     friend.Avatar = new Uri(template.Data.GetDataByName("avatar").Value);
     friend.Id = id;
     return friend;
 }
 public int Add(Friend friend)
 {
     friend.Id = id++;
     friends.Add(friend);
     return friend.Id;
 }