Skip to content

Commit 191bd1a

Browse files
author
Raffaele Marcello
committed
Refactor AppDbContext and Message classes
1 parent 2f61b7e commit 191bd1a

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/Application/src/RazorPagesTestSample/Data/AppDbContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Microsoft.EntityFrameworkCore;
55
using System.Threading;
66

7-
// added a comment
87
namespace RazorPagesTestSample.Data
98
{
109
public class AppDbContext : DbContext
Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
using System.ComponentModel.DataAnnotations;
22

3-
/// <summary>
4-
/// Represents a message entity with an ID and text content.
5-
/// </summary>
6-
public class Message
7-
{
8-
/// <summary>
9-
/// Gets or sets the unique identifier for the message.
10-
/// </summary>
11-
public int Id { get; set; }
12-
13-
/// <summary>
14-
/// Gets or sets the text content of the message.
15-
/// </summary>
16-
/// <remarks>
17-
/// The text content is required and has a maximum length of 250 characters.
18-
/// </remarks>
19-
[Required]
20-
[DataType(DataType.Text)]
21-
[StringLength(250, ErrorMessage = "There's a 250 character limit on messages. Please shorten your message.")]
22-
public string Text { get; set; }
23-
}
24-
/// /// /// /// /// /// /// namespace RazorPagesTestSample.Data
3+
namespace RazorPagesTestSample.Data
254
{
265
#region snippet1
276
public class Message
@@ -34,4 +13,4 @@ public class Message
3413
public string Text { get; set; }
3514
}
3615
#endregion
37-
}
16+
}

0 commit comments

Comments
 (0)