Former-commit-id: b77128a1da66774a8cfe677fed6b46cfc48a9d40
TangShanKaiPing
wanggang 5 years ago
parent 514fde0456
commit 6fbc825406

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Version>1.0.0-beta.330</Version>
<Version>1.0.0-beta.402</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.3" />

@ -18,6 +18,7 @@ namespace IoTNode
.AddJsonFile("appsettings.json", optional: true)
.Build();
WebHost.CreateDefaultBuilder(args)
.UseConfiguration(config)
.ConfigureLogging((c, o) =>
{
Log.Logger = new LoggerConfiguration()

@ -7,6 +7,7 @@ using Infrastructure.Security;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Localization;
using Newtonsoft.Json;
using System.Linq;
namespace UserCenter.Controllers
@ -30,8 +31,11 @@ namespace UserCenter.Controllers
public IActionResult Index()
{
//var modelMetadata = this.GetModelMetadata<RegisterModel>();
//var json = modelMetadata.ToJson();
var modelMetadata = this.GetModelMetadata<RegisterModel>();
var json = JsonConvert.SerializeObject(modelMetadata, new JsonSerializerSettings
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
});
return View(this._siteRepo.ReadOnlyTable().ToList());
}
}

Loading…
Cancel
Save