Ejemplo n.º 1
0
 internal Post(BlogId blogId, Guid postId, string title, string excerpt, string body, AuthorId authorId)
     : base(postId)
 {
     Blog      = blogId;
     Title     = title;
     Excerpt   = excerpt;
     Slug      = title.GenerateSlug();
     Body      = body;
     Author    = authorId;
     CreatedAt = DateTimeHelper.GenerateDateTime();
     Events.Add(new PostCreated(postId));
 }
Ejemplo n.º 2
0
 public static Post CreateInstance(BlogId blogId, string title, string excerpt, string body, AuthorId authorId)
 {
     return(new Post(blogId, title, excerpt, body, authorId));
 }
Ejemplo n.º 3
0
 internal Post(BlogId blogId, string title, string excerpt, string body, AuthorId authorId)
     : this(blogId, IdHelper.GenerateId(), title, excerpt, body, authorId)
 {
 }