1、報跨域問題,第一種:webconfig沒有配置跨域方法,百度可以查到,第二種:有可能是接口錯誤,第三種:配置環境有問題,可能是只更新了webapi.dll,涉及到的數據庫的WebAPIDAL.dll沒修改,或者涉及其他的dll沒修改!!!!
2.查詢的數據為空
Object reference not set to an instance of an object.
3.更新時出錯
An error occurred while updating the entries. See the inner exception for details.
4.查詢時報錯(SingleOrDefault:返回序列中滿足條件的唯一元素,如果返回多個元素報異常)
Sequence contains more than one element
解決方法:
使用FirstOrDefault:返回序列中的第一個元素,返回的元素空,則返回默認值
