From 3df32bcf144f1418267e986da7ffdc9c7242de63 Mon Sep 17 00:00:00 2001 From: Loic Masi Date: Thu, 9 Apr 2026 12:26:50 +0200 Subject: [PATCH] #199 : changement du format de date pour postgresql. 2. --- Webzine.Business/TitreAdminService.cs | 2 +- .../Areas/Administration/Controllers/TitreController.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Webzine.Business/TitreAdminService.cs b/Webzine.Business/TitreAdminService.cs index e23af11..4372e67 100644 --- a/Webzine.Business/TitreAdminService.cs +++ b/Webzine.Business/TitreAdminService.cs @@ -57,7 +57,7 @@ public class TitreAdminService : ITitreAdminService Album = commande.Album, Chronique = commande.Chronique, DateCreation = DateTime.UtcNow, - DateSortie = commande.DateSortie, + DateSortie = DateTime.Parse(commande.DateSortie.ToString()), Duree = commande.Duree, UrlJaquette = commande.UrlJaquette, UrlEcoute = commande.UrlEcoute ?? string.Empty, diff --git a/Webzine.WebApplication/Areas/Administration/Controllers/TitreController.cs b/Webzine.WebApplication/Areas/Administration/Controllers/TitreController.cs index 8186cc2..0f19327 100644 --- a/Webzine.WebApplication/Areas/Administration/Controllers/TitreController.cs +++ b/Webzine.WebApplication/Areas/Administration/Controllers/TitreController.cs @@ -141,7 +141,6 @@ public class TitreController : Controller return this.View(form); } - model.DateSortie = DateTime.Parse(model.DateSortie.ToString()); this.titreAdminService.CreerTitre(model); return this.RedirectToAction("Index"); }