Adds Database Structure in C# with Entity Framework

This commit is contained in:
Henry Trumme
2025-04-22 00:59:47 +02:00
parent 370edc17e9
commit 1e6c7a47a4
71 changed files with 6197 additions and 140 deletions

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace WatchLog.Data
{
public class Genre
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public required string Name { get; set; }
[Required]
public required DateTime CreationTime { get; set; }
public DateTime? LastChange { get; set; }
// --- Navigation Properties ---
public virtual ICollection<LinkTableGlobalGenre> LinkTableGlobalGenres { get; set; } = new List<LinkTableGlobalGenre>();
}
}