Beispiel #1
0
        public Post PublishPost(Topic topic, User author, string content)
        {
            Post post = Post.Create(topic, author, content);

            postRepository.Add(post);

            repositoryContext.Commit();

            return post;
        }
Beispiel #2
0
        public static User Create(string name, string email, string password) 
        {
            User user = new User();

            user.Name = name;
            user.NickName = name;
            user.Email = email;
            user.Password = password;

            return user;
        }
Beispiel #3
0
        //[Reference()]
        //public Post Post
        //{
        //    get
        //    {
        //        return this.post;
        //    }
        //    set
        //    {
        //        this.post = value;
        //    }
        //}

        public static Comment Create(Post post, User author, string content) 
        {
            return new Comment(post, author, content);
        }
Beispiel #4
0
 public Comment(Post post, User author, string content) : base()
 {
     this.post = post;
     this.author = author;
     this.content = content;
 }
Beispiel #5
0
 public Post(Topic topic, User author, string content)
 {
     this.topic = topic;
     this.author = author;
     this.content = content;
 }
Beispiel #6
0
 public static Post Create(Topic topic, User author, string content) 
 {
     return new Post(topic, author, content);
 }