mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
v1.3.0-preview10 tests
This commit is contained in:
parent
a7b09bf0af
commit
25312ceead
@ -195,6 +195,7 @@ namespace FreeSql.Tests.Odbc.Dameng
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ToDictionary()
|
public void ToDictionary()
|
||||||
{
|
{
|
||||||
|
g.dameng.Insert(new Topic { Title = "xxx" }).ExecuteAffrows();
|
||||||
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
||||||
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
||||||
|
|
||||||
@ -717,7 +718,6 @@ namespace FreeSql.Tests.Odbc.Dameng
|
|||||||
{
|
{
|
||||||
b.Key,
|
b.Key,
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -729,7 +729,6 @@ namespace FreeSql.Tests.Odbc.Dameng
|
|||||||
b.Key.yyyy,
|
b.Key.yyyy,
|
||||||
|
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key.yyyy),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
var aggtolist2 = select
|
var aggtolist2 = select
|
||||||
@ -738,9 +737,7 @@ namespace FreeSql.Tests.Odbc.Dameng
|
|||||||
{
|
{
|
||||||
b.Key.Title,
|
b.Key.Title,
|
||||||
b.Key.yyyy,
|
b.Key.yyyy,
|
||||||
|
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key.yyyy),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -750,7 +747,6 @@ namespace FreeSql.Tests.Odbc.Dameng
|
|||||||
{
|
{
|
||||||
b.Key,
|
b.Key,
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid),
|
sum2 = b.Sum(b.Value.TypeGuid),
|
||||||
sum3 = b.Sum(b.Value.Type.Parent.Id)
|
sum3 = b.Sum(b.Value.Type.Parent.Id)
|
||||||
});
|
});
|
||||||
|
@ -195,6 +195,7 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ToDictionary()
|
public void ToDictionary()
|
||||||
{
|
{
|
||||||
|
g.oracle.Insert(new Topic { Title = "xxx" }).ExecuteAffrows();
|
||||||
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
||||||
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
||||||
|
|
||||||
@ -708,7 +709,6 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
{
|
{
|
||||||
b.Key,
|
b.Key,
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
var aggtolist1 = select
|
var aggtolist1 = select
|
||||||
@ -717,7 +717,6 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
{
|
{
|
||||||
b.Key,
|
b.Key,
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -729,7 +728,6 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
b.Key.yyyy,
|
b.Key.yyyy,
|
||||||
|
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key.yyyy),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
var aggtolist2 = select
|
var aggtolist2 = select
|
||||||
@ -740,7 +738,6 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
b.Key.yyyy,
|
b.Key.yyyy,
|
||||||
|
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key.yyyy),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid)
|
sum2 = b.Sum(b.Value.TypeGuid)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -750,7 +747,6 @@ namespace FreeSql.Tests.Odbc.Oracle
|
|||||||
{
|
{
|
||||||
b.Key,
|
b.Key,
|
||||||
cou = b.Count(),
|
cou = b.Count(),
|
||||||
sum = b.Sum(b.Key),
|
|
||||||
sum2 = b.Sum(b.Value.TypeGuid),
|
sum2 = b.Sum(b.Value.TypeGuid),
|
||||||
sum3 = b.Sum(b.Value.Type.Parent.Id)
|
sum3 = b.Sum(b.Value.Type.Parent.Id)
|
||||||
});
|
});
|
||||||
|
@ -186,6 +186,7 @@ namespace FreeSql.Tests.MsAccess
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ToDictionary()
|
public void ToDictionary()
|
||||||
{
|
{
|
||||||
|
g.msaccess.Insert(new Topic { Title = "xxx" }).ExecuteAffrows();
|
||||||
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
||||||
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a=> new { a.Id, a.Title });
|
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a=> new { a.Id, a.Title });
|
||||||
var testDto11 = select.Limit(10).ToDictionaryAsync(a => a.Id).Result;
|
var testDto11 = select.Limit(10).ToDictionaryAsync(a => a.Id).Result;
|
||||||
|
@ -195,6 +195,7 @@ namespace FreeSql.Tests.Oracle
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ToDictionary()
|
public void ToDictionary()
|
||||||
{
|
{
|
||||||
|
g.oracle.Insert(new Topic { Title = "xxx" }).ExecuteAffrows();
|
||||||
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
||||||
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
||||||
|
|
||||||
|
@ -195,6 +195,7 @@ namespace FreeSql.Tests.SqlServer
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ToDictionary()
|
public void ToDictionary()
|
||||||
{
|
{
|
||||||
|
g.sqlserver.Insert(new Topic { Title = "xxx" }).ExecuteAffrows();
|
||||||
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
var testDto1 = select.Limit(10).ToDictionary(a => a.Id);
|
||||||
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
var testDto2 = select.Limit(10).ToDictionary(a => a.Id, a => new { a.Id, a.Title });
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user