public ResultModel Create(InterfaceString data) { try { var str = _interfaceStringService.GetString(data.Key); if (str == null) { _interfaceStringService.Upsert(data); return(ResultModel.Success); } return(new ResultModel(false, "Exists")); } catch (Exception e) { _logService.LogError(e); return(new ResultModel(e)); } }
public static MvcHtmlString iStr(this HtmlHelper html, string key) { var strVal = _interfaceStringService.GetString(key).Value; return(new MvcHtmlString(strVal)); }