title: System.InvalidCastException: 'The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects.'
body: <p>I migrated my project from ASP.NET Core 2.2 to ASP.NET Core 3.0. Now I get this exception. In ASP.NET Core 2.2 it was using <code>FromSql()</code>; now it is using <code>FromSqlRaw()</code>. I am calling my procedure using Entity Framework Core.</p>
  
  <pre><code>SqlParameter Username = new SqlParameter
              {
                  ParameterName = "USERNAME",
                  SqlDbType = SqlDbType.NVarChar,
                  Value = user.Username,
                  Direction = ParameterDirection.Input,
                  Size = 50
              };
  
  SqlParameter Password = new SqlParameter
              {
                  ParameterName = "PASSWORD",
                  SqlDbType = SqlDbType.NVarChar,
                  Value = user.Password,
                  Direction = ParameterDirection.Input,
                  Size = 50
              };
  
  SqlParameter msgOut = new SqlParameter
              {
                  ParameterName = "MSG",
                  SqlDbType = SqlDbType.NVarChar,
                  Direction = ParameterDirection.Output,
                  Size = 1000
              };
  
  SqlParameter statusOut = new SqlParameter
              {
                  ParameterName = "STATUS",
                  SqlDbType = SqlDbType.Int,
                  Direction = ParameterDirection.Output
              };
  
  var sql = @"EXEC PRC_USERS_LOGIN
                          @USERNAME, 
                          @PASSWORD, 
                          @MSG OUT, 
                          @STATUS OUT";
  
  Users resultUser = new Users();
  resultUser = ctx.Users.FromSqlRaw(sql, Username, Password, msgOut, statusOut)
                        .FirstOrDefault();
  </code></pre>