@@ -2,6 +2,7 @@
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace IRaCIS.Core.Infrastructure.Extention
|
||||
{
|
||||
@@ -112,7 +113,16 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
||||
public static IResponseOutput<string> NotOk(LocalizedString msg, ApiResponseCodeEnum code = ApiResponseCodeEnum.BusinessValidationFailed)
|
||||
{
|
||||
|
||||
return new ResponseOutput<string>().NotOk(msg, code: code, localizedInfo: $"[{msg.Name}]:{StaticData.Log_Locoalize_Dic[msg.Name]}" );
|
||||
var key = msg.Name;
|
||||
|
||||
var info = string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(key) && StaticData.Log_Locoalize_Dic.ContainsKey(key))
|
||||
{
|
||||
info = $"[{key}]:{StaticData.Log_Locoalize_Dic[key]}";
|
||||
}
|
||||
|
||||
return new ResponseOutput<string>().NotOk(msg, code: code, localizedInfo: info);
|
||||
}
|
||||
|
||||
public static IResponseOutput<string> DBNotExistIfNUll(object businessObject)
|
||||
|
||||
Reference in New Issue
Block a user