The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects in Microsoft.Data.SqlClient
问题 I'm trying to use one of these namespaces //using Microsoft.Data.SqlClient; using System.Data.SqlClient; My model public class Get_Data_Scholar{ [Key] public Int32 ID_Transcript { get; set; } public string Year_Semester { get; set; } public string Period { get; set; } public string Status { get; set; } } My controller public JsonResult Get_GPA_Tuition (Int32 id) { var ID_NCS = new SqlParameter("@ID_NCS", id); List<Get_data> get_Data = new List<Models.Get_Data_Scholar>(); get_Data =