報錯:沒法從int?轉換爲int

□ 背景分析post 在控制器方法中的一個參數容許爲null值:public ActionResult GetByCategory(int? categoryId = null) 當把這裏的categoryId傳給服務類方法時 var products = service.LoadProductsByCategory((categoryId),報錯。blog □ 解決方法io 這裏的categor
相關文章
相關標籤/搜索