Browse Source

-

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
44a8eef9e6
  1. 8
      Src/Asp.Net/SqlSugar/Entities/ConnectionConfig.cs
  2. 13
      Src/Asp.Net/SqlSugar/IntegrationServices/DefaultServices.cs
  3. 1
      Src/Asp.Net/SqlSugar/SqlSugar.csproj

8
Src/Asp.Net/SqlSugar/Entities/ConnectionConfig.cs

@ -26,11 +26,13 @@ namespace SqlSugar
/// <summary>
/// Configure External Services replace default services,For example, Redis storage
/// </summary>
public ConfigureExternalServices ConfigureExternalServices { get; set; }
public ConfigureExternalServices ConfigureExternalServices = _DefaultServices;
private static ConfigureExternalServices _DefaultServices = new ConfigureExternalServices();
}
public class ConfigureExternalServices
{
public ISerializeService SerializeService { get; set; }
public ISerializeService SerializeService =DefaultServices.Serialize;
public ICacheService ReflectionInoCache = DefaultServices.ReflectionInoCache;
}
}

13
Src/Asp.Net/SqlSugar/IntegrationServices/DefaultServices.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SqlSugar
{
public class DefaultServices
{
public static ICacheService ReflectionInoCache = new ReflectionInoCache();
public static ISerializeService Serialize = new SerializeService();
}
}

1
Src/Asp.Net/SqlSugar/SqlSugar.csproj

@ -94,6 +94,7 @@
<Compile Include="ExpressionsToSql\Subquery\SubTools.cs" />
<Compile Include="Infrastructure\DependencyManagement.cs" />
<Compile Include="IntegrationInterface\ISerializeService.cs" />
<Compile Include="IntegrationServices\DefaultServices.cs" />
<Compile Include="Realization\Oracle\Deleteable\OracleDeleteable.cs" />
<Compile Include="Realization\Oracle\Insertable\OracleInsertable.cs" />
<Compile Include="Realization\Oracle\Updateable\OracleUpdateable.cs" />

Loading…
Cancel
Save