mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update unit test
This commit is contained in:
parent
d019b96f7e
commit
850cd0bebb
@ -11,7 +11,7 @@ namespace OrmTest
|
||||
/// <param name="args"></param>
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
UinitCustomConvert.Init();
|
||||
//Demo
|
||||
Demo0_SqlSugarClient.Init();
|
||||
Demo1_Queryable.Init();
|
||||
|
@ -97,6 +97,7 @@
|
||||
<Compile Include="Models\OrderItem.cs" />
|
||||
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
||||
<Compile Include="Models\ViewOrder.cs" />
|
||||
<Compile Include="UnitTest\ISugarDataConverter.cs" />
|
||||
<Compile Include="UnitTest\UinitCustomConvert.cs" />
|
||||
<Compile Include="UnitTest\UInsert3.cs" />
|
||||
<Compile Include="UnitTest\Unitadfa1231.cs" />
|
||||
|
@ -74,17 +74,17 @@ namespace OrmTest
|
||||
public SqlSugar.DbType? EnumValue { get;set; }
|
||||
}
|
||||
|
||||
|
||||
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 str = new SerializeService().SerializeObject(value);
|
||||
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) + "";
|
||||
return new SerializeService().DeserializeObject<T>(str);
|
||||
|
Loading…
Reference in New Issue
Block a user