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); }
public ObjectId GetUserId() { try { return(repository.GetId(NicknameRead())); } catch { return(new ObjectId()); } }