From 85b7a3825530c1615f97b996899be25ebf8074d1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 27 Jan 2020 18:20:30 +0000 Subject: [PATCH] --- server/AyaNova/biz/LocaleBiz.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/AyaNova/biz/LocaleBiz.cs b/server/AyaNova/biz/LocaleBiz.cs index c730edfa..0d9eabe9 100644 --- a/server/AyaNova/biz/LocaleBiz.cs +++ b/server/AyaNova/biz/LocaleBiz.cs @@ -297,7 +297,7 @@ namespace AyaNova.Biz // //Can save or update? - private void Validate(string inObjName, bool isNew) + private async Task Validate(string inObjName, bool isNew) { //run validation and biz rules @@ -310,7 +310,7 @@ namespace AyaNova.Biz AddError(ApiErrorCode.VALIDATION_LENGTH_EXCEEDED, "Name", "255 char max"); //Name must be unique - if (ct.Locale.Where(m => m.Name == inObjName).FirstOrDefault() != null) + if( await ct.Locale.AnyAsync(m => m.Name == inObjName)) AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Name"); return;