wx
2022-02-18 dbe3a91f87f65e893ae1e82f829e1a45496644d7
ZTICInterface.Web.Entry/Program.cs
@@ -1,11 +1,12 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using ZTICInterface.Application.Base;
using ZTICInterface.Core;
var builder = WebApplication.CreateBuilder(args).Inject();
builder.Services.AddControllers()
    .AddInjectWithUnifyResult<RESTfulResultProvider>()
    //.AddInjectWithUnifyResult<RESTfulResultProvider>()
    .AddNewtonsoftJson(options =>
    {
        options.SerializerSettings.ContractResolver =
@@ -13,10 +14,11 @@
        options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Local;
        options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
        options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; //忽略循环引用
    });
    })
    ;
builder.Services.AddSqlsugarSetup();
builder.Services.AddSingleton(typeof(Repository<>));