以下是代码示例:privatevoidloadCustomer(intcustIdToQuery){vardbContext=newSampleDB();try{varcustomerContext=fromtindbContext.tblCustomers//keepsthrowing:wheret.CustID.Equals(custIdToQuery)//Unabletocreateaconstantvalueoftype'System.Object'.selectnew//Onlyprimitivetypes('suchasInt32,String,andGuid'){//ar
以下是代码示例:privatevoidloadCustomer(intcustIdToQuery){vardbContext=newSampleDB();try{varcustomerContext=fromtindbContext.tblCustomers//keepsthrowing:wheret.CustID.Equals(custIdToQuery)//Unabletocreateaconstantvalueoftype'System.Object'.selectnew//Onlyprimitivetypes('suchasInt32,String,andGuid'){//ar