From 4745ebad98db0db9076aefd78f2add0a121592e8 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Thu, 19 Dec 2024 12:03:23 +0330 Subject: [PATCH] limitimg field lengths --- RMuseum/DbContext/RMuseumDbContext.cs | 44 ++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/RMuseum/DbContext/RMuseumDbContext.cs b/RMuseum/DbContext/RMuseumDbContext.cs index 353f40d6..c9c59a2f 100644 --- a/RMuseum/DbContext/RMuseumDbContext.cs +++ b/RMuseum/DbContext/RMuseumDbContext.cs @@ -17,7 +17,6 @@ using System.IO; using RMuseum.Models.FAQ; using RMuseum.Models.PDFLibrary; using RMuseum.Models.ExternalFTPUpload; -using Microsoft.EntityFrameworkCore.Diagnostics; namespace RMuseum.DbContext { @@ -251,6 +250,49 @@ namespace RMuseum.DbContext .Property(e => e.PoemSummary) .HasMaxLength(3000); + /* + Phase 2: + + builder.Entity() + .Property(e => e.FriendlyUrl) + .HasMaxLength(40); + + builder.Entity() + .Property(e => e.Name) + .HasMaxLength(1200); + + builder.Entity() + .Property(e => e.NameInEnglish) + .HasMaxLength(1200); + + builder.Entity() + .Property(e => e.FriendlyUrl) + .HasMaxLength(16); + + builder.Entity() + .Property(e => e.Name) + .HasMaxLength(1200); + + builder.Entity() + .Property(e => e.NameInEnglish) + .HasMaxLength(1200); + + builder.Entity() + .Property(e => e.Name) + .HasMaxLength(128); + + builder.Entity() + .Property(e => e.NameInEnglish) + .HasMaxLength(128); + + builder.Entity() + .Property(e => e.PluralName) + .HasMaxLength(128); + + builder.Entity() + .Property(e => e.PluralNameInEnglish) + .HasMaxLength(128); + */ }