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)); }
public static Post CreateInstance(BlogId blogId, string title, string excerpt, string body, AuthorId authorId) { return(new Post(blogId, title, excerpt, body, authorId)); }
internal Post(BlogId blogId, string title, string excerpt, string body, AuthorId authorId) : this(blogId, IdHelper.GenerateId(), title, excerpt, body, authorId) { }