-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathBlogPostTemplate.cs
More file actions
33 lines (26 loc) · 878 Bytes
/
BlogPostTemplate.cs
File metadata and controls
33 lines (26 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace LinkDotNet.Blog.Domain;
public sealed class BlogPostTemplate : Entity
{
public string Name { get; private set; } = default!;
public string Title { get; private set; } = default!;
public string ShortDescription { get; private set; } = default!;
public string Content { get; private set; } = default!;
public static BlogPostTemplate Create(string name, string title, string shortDescription, string content)
{
return new BlogPostTemplate
{
Name = name,
Title = title,
ShortDescription = shortDescription,
Content = content
};
}
public void Update(string name, string title, string shortDescription, string content)
{
Name = name;
Title = title;
ShortDescription = shortDescription;
Content = content;
}
}