mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 10:08:11 +08:00
Update unit test
This commit is contained in:
parent
d019b96f7e
commit
850cd0bebb
@ -11,7 +11,7 @@ namespace OrmTest
|
|||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
UinitCustomConvert.Init();
|
||||||
//Demo
|
//Demo
|
||||||
Demo0_SqlSugarClient.Init();
|
Demo0_SqlSugarClient.Init();
|
||||||
Demo1_Queryable.Init();
|
Demo1_Queryable.Init();
|
||||||
|
@ -97,6 +97,7 @@
|
|||||||
<Compile Include="Models\OrderItem.cs" />
|
<Compile Include="Models\OrderItem.cs" />
|
||||||
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
||||||
<Compile Include="Models\ViewOrder.cs" />
|
<Compile Include="Models\ViewOrder.cs" />
|
||||||
|
<Compile Include="UnitTest\ISugarDataConverter.cs" />
|
||||||
<Compile Include="UnitTest\UinitCustomConvert.cs" />
|
<Compile Include="UnitTest\UinitCustomConvert.cs" />
|
||||||
<Compile Include="UnitTest\UInsert3.cs" />
|
<Compile Include="UnitTest\UInsert3.cs" />
|
||||||
<Compile Include="UnitTest\Unitadfa1231.cs" />
|
<Compile Include="UnitTest\Unitadfa1231.cs" />
|
||||||
|
@ -75,16 +75,16 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static class DictionaryConvert
|
public class DictionaryConvert : ISugarDataConverter
|
||||||
{
|
{
|
||||||
public static SugarParameter ParameterConverter<T>(object value, int i)
|
public SugarParameter ParameterConverter<T>(object value, int i)
|
||||||
{
|
{
|
||||||
var name = "@myp" + i;
|
var name = "@myp" + i;
|
||||||
var str = new SerializeService().SerializeObject(value);
|
var str = new SerializeService().SerializeObject(value);
|
||||||
return new SugarParameter(name, str);
|
return new SugarParameter(name, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T QueryConverter<T>(this IDataRecord dr ,int i)
|
public T QueryConverter<T>(IDataRecord dr, int i)
|
||||||
{
|
{
|
||||||
var str = dr.GetValue(i) + "";
|
var str = dr.GetValue(i) + "";
|
||||||
return new SerializeService().DeserializeObject<T>(str);
|
return new SerializeService().DeserializeObject<T>(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user