From d7845590876bcd0ecb5baaedfe6ca070b43cf1b9 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Tue, 16 Feb 2021 19:23:23 +0330 Subject: [PATCH] #75 a small validation check to see if comment text is not null or empty --- RMuseum/Services/Implementation/GanjoorService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 39d913a0..a875a15f 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -537,6 +537,11 @@ namespace RMuseum.Services.Implementation { try { + if(string.IsNullOrEmpty(content)) + { + return new RServiceResult(null, "متن حاشیه خالی است."); + } + GanjoorComment comment = new GanjoorComment() { UserId = userId,