目前我有一个这样的代码优先模型:
public class Ticket
{
public int SERIAL_NO { get; set; }
public DateTime SUBMIT_DATE { get; set; }
public string SYNOPSIS { get; set; }
public string DESCRIPTION { get; set; } // This is really an Oracle CLOB in the DB
}
在工单控制器中,当用户单击提交时,我让它从数据库中选择最大 SERIAL_NO,如下所示:
var lastSerial = db.Tickets.Select(x => x.SERIAL_NO).Max();
它抛出这个错误:
ORA-00932: inconsistent datatypes: expected - got NCLOB
有人有想法么?提前致谢!