예제 #1
0
파일: Topic.cs 프로젝트: tu226/Eagle
        public static Topic Create(string name, string summary, DateTime expiredDate) 
        {
            Topic topic = new Topic();

            topic.Name = name;
            topic.Summary = summary;
            topic.ExpiredDate = expiredDate;

            return topic;
        } 
예제 #2
0
        public Post PublishPost(Topic topic, User author, string content)
        {
            Post post = Post.Create(topic, author, content);

            postRepository.Add(post);

            repositoryContext.Commit();

            return post;
        }
예제 #3
0
파일: Post.cs 프로젝트: tu226/Eagle
 public Post(Topic topic, User author, string content)
 {
     this.topic = topic;
     this.author = author;
     this.content = content;
 }
예제 #4
0
파일: Post.cs 프로젝트: tu226/Eagle
 public static Post Create(Topic topic, User author, string content) 
 {
     return new Post(topic, author, content);
 }