Add project files.

This commit is contained in:
2026-02-03 23:02:37 +01:00
parent 94bae0de01
commit 263a4d54f6
92 changed files with 85145 additions and 0 deletions

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace DiaryApp.Models
{
public class DiaryEntry
{
//[Key]
public int Id { get; set; }
[Required(ErrorMessage = "Please enter a title")]
[StringLength(50, MinimumLength = 3,
ErrorMessage = "Title must be between 3 and 100 Characters!")]
public string Title { get; set; } = string.Empty;
[Required]
public string Content { get; set; } = string.Empty;
[Required]
public DateTime DateCreated { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,9 @@
namespace DiaryApp.Models
{
public class ErrorViewModel
{
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}