File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
LinkDotNet.Blog.Infrastructure/Persistence/Sql/Mapping
LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ public class TagsConfiguration : IEntityTypeConfiguration<Tag>
8
8
{
9
9
public void Configure ( EntityTypeBuilder < Tag > builder )
10
10
{
11
+ builder . HasKey ( c => c . Id ) ;
11
12
builder . Property ( c => c . Id ) . ValueGeneratedOnAdd ( ) ;
12
13
builder . Property ( c => c . Content ) . HasMaxLength ( 64 ) . IsRequired ( ) ;
13
14
}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class CreateNewModel
19
19
private string previewImageUrlFallback ;
20
20
21
21
[ Required ]
22
+ [ MaxLength ( 256 ) ]
22
23
public string Title
23
24
{
24
25
get => title ;
@@ -52,6 +53,7 @@ public string Content
52
53
}
53
54
54
55
[ Required ]
56
+ [ MaxLength ( 1024 ) ]
55
57
public string PreviewImageUrl
56
58
{
57
59
get => previewImageUrl ;
@@ -94,6 +96,7 @@ public string Tags
94
96
}
95
97
}
96
98
99
+ [ MaxLength ( 256 ) ]
97
100
public string PreviewImageUrlFallback
98
101
{
99
102
get => previewImageUrlFallback ;
You can’t perform that action at this time.
0 commit comments