增加同步物流模块
修改现有架构,改为分模块( 简易版)
This commit is contained in:
1 parent
15e11618c9
commit
fa03add754
120 files changed
+9438
-299
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using Autofac;
|
||||
using Autofac.Integration.WebApi;
|
||||
using AutoMapper;
|
||||
using FreeSql;
|
||||
using KJD_Web.Repository;
|
||||
using KJD_Web.Utils;
|
||||
@@ -8,6 +9,7 @@ using MAX.Core.Logger;
|
||||
using MAX.Framework.Logger;
|
||||
using MySql.Data.MySqlClient;
|
||||
using NLog;
|
||||
using Store.Framework.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
@@ -27,30 +29,15 @@ namespace KJD_Web
|
||||
NLogger.Instance.Info("应用程序启动");
|
||||
var container = ContainerConfig.BuildContainer();
|
||||
|
||||
|
||||
// 让 Web API 用 Autofac 解析 Controller
|
||||
GlobalConfiguration.Configuration.DependencyResolver =
|
||||
new AutofacWebApiDependencyResolver(container);
|
||||
GlobalConfiguration.Configure(WebApiConfig.Register);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static IFreeSql CreateImageCacheFreeSql()
|
||||
{
|
||||
var connection = ConfigurationManager.ConnectionStrings["ConnKJD"];
|
||||
if (connection == null || string.IsNullOrWhiteSpace(connection.ConnectionString))
|
||||
{
|
||||
throw new ConfigurationErrorsException("未配置连接字符串:ConnKJD");
|
||||
}
|
||||
//var connectionBuilder = new MySqlConnectionStringBuilder(connection.ConnectionString)
|
||||
//{
|
||||
// Database = "imagecache"
|
||||
//};
|
||||
|
||||
return new FreeSqlBuilder()
|
||||
.UseConnectionString(DataType.MySql, connection.ConnectionString)
|
||||
.UseAutoSyncStructure(false)
|
||||
.Build();
|
||||
}
|
||||
|
||||
protected void Session_Start(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user