From 90a96d093b5beaf9c0d6e632cec9752e97b55ad3 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 23 May 2017 11:28:30 -0400 Subject: [PATCH] add unite discriminator to entry id --- Project-Unite/Controllers/ContestsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project-Unite/Controllers/ContestsController.cs b/Project-Unite/Controllers/ContestsController.cs index e878bf7..1cc7070 100644 --- a/Project-Unite/Controllers/ContestsController.cs +++ b/Project-Unite/Controllers/ContestsController.cs @@ -201,7 +201,7 @@ public ActionResult SubmitEntry(SubmitContestEntryViewModel model) entry.ContestId = model.ContestId; entry.VideoId = model.VideoID; string allowed = "abcdefghijklmnopqrstuvwxyz1234567890_"; - entry.Id = entry.Name.ToLower(); + entry.Id = entry.Name.ToLower() + "_" + db.ContestEntries.Count().ToString(); foreach (var ch in entry.Id.ToCharArray()) if (!allowed.Contains(ch)) entry.Id = entry.Id.Replace(ch, '_');