使用人大金仓数据库查询时出错 "42846: cannot cast type boolean to interval" 返回
SqlSugar
处理完成
5
419
南风 发布于2024/5/14
悬赏:0 飞吻
dto如下
public class GetProductResponseDto
{
/// <summary>
///货品
/// </summary>
public long ProductId { get; set; }
/// <summary>
///生产时间
/// </summary>
public DateTime? CreateDate { get; set; }
/// <summary>
///过期日期
/// </summary>
public DateTime? ExpirationDate { get; set; }
}
热忱回答(5)
-
fate sta VIP02024/5/14
Sqlsugar版本是多少?
0 回复 -
fate sta VIP02024/5/14
另外金仓哪个模式 ?
0 回复 -
南风 VIP02024/5/15
@fate sta:5.1.4.151
0 回复 -
南风 VIP02024/5/15
@fate sta:Oracle模式
0 回复 -
fate sta VIP02024/5/20
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OrmTest { internal class Unitadfa241 { public static void Init() { var db = NewUnitTest.Db; db.CodeFirst.InitTables<Unitadfafa>(); db.Insertable(new Unitadfafa() { dateTime=DateTime.Now, dateTime2=DateTime.Now }).ExecuteCommand(); var list= db.Queryable<Unitadfafa>() .Select(IT => new UnitadfafaDTO { dateTime=(DateTime?)Convert.ToDateTime( null), dateTime2=IT.dateTime2.AddDays(10) }).ToList(); } public class Unitadfafa { [SqlSugar.SugarColumn(IsNullable =true)] public DateTime? dateTime { get; set; } public DateTime dateTime2 { get; set; } } public class UnitadfafaDTO { public DateTime? dateTime { get; set; } public DateTime dateTime2 { get; set; } } } }
我这个测试用例可以跑通,你安装最新的测试
0 回复