Esempio n. 1
0
        public void InsertPost(string text, string username)
        {
            Post post = new Post();

            post.Text      = text;
            post.PostOwner = userRepository.GetId(username);
            post.Time      = DateTime.Now;
            repository.Add(post);
        }
Esempio n. 2
0
 public ObjectId GetUserId()
 {
     try
     {
         return(repository.GetId(NicknameRead()));
     }
     catch
     {
         return(new ObjectId());
     }
 }