public Post PublishPost(Topic topic, User author, string content) { Post post = Post.Create(topic, author, content); postRepository.Add(post); repositoryContext.Commit(); return post; }
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; }
//[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); }
public Comment(Post post, User author, string content) : base() { this.post = post; this.author = author; this.content = content; }
public Post(Topic topic, User author, string content) { this.topic = topic; this.author = author; this.content = content; }
public static Post Create(Topic topic, User author, string content) { return new Post(topic, author, content); }