Getting above error on the last line of the following code. I'm using EF Core 1.1
. Trying to follow this suggestion.
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient; //Visual Studio had greyed out this line suggesting this as unnecessary.
var conn = _context.Database.GetDbConnection();
var cmd = conn.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "MySproc";
cmd.Parameters.AddWithValue("@MyParameter", 42);