Add unit test

This commit is contained in:
sunkaixuan 2023-07-07 20:37:50 +08:00
parent dcde6b3a6f
commit 5ad04c7276
3 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
public class PRT_BMS_SA_WEBCON_DOC_V
{
public PRT_BMS_SA_WEBCON_DOC_V()
{
}
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
public long SALESID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string SACONNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public long? SADEPTID { get; set; }
}
}

View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
public class PRT_BMS_SA_WEBCON_DTL_VP
{
public PRT_BMS_SA_WEBCON_DTL_VP()
{
}
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public long? SALESID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
public long SALESDTLID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public long? SADEPTID { get; set; }
}
}

View File

@ -17,6 +17,8 @@ namespace OrmTest
.ToSqlString(); .ToSqlString();
var test =db.Queryable<PRT_BMS_SA_WEBCON_DOC_V>().Where(a => a.SALESID == (long)SqlFunc.Subqueryable<PRT_BMS_SA_WEBCON_DTL_VP>().GroupBy(z => z.SALESID).Select(z => z.SALESID)).Select(a => new { a.SALESID, a.SACONNO }).Clone()
.ToSqlString();
} }
} }
[SugarTable("FLOW_TEMPLATE")] [SugarTable("FLOW_TEMPLATE")]