title: How to execute stored procedure for multiple parameters using FromSqlInterpolated in EF Core 3.0?
body: <p>I have a <strong>stored procedure</strong> in Sql Server 2017 which takes three parameters.</p>
  
  <pre><code>CREATE PROCEDURE UpdateRestaurantInformation
  @restaurantId nvarchar(max),
  @restaurantName nvarchar(max),
  @locationId int
  AS
  BEGIN
      UPDATE Restaurants
      SET RestaurantName = @restaurantName, LocationId = @locationId
      WHERE RestaurantId = @restaurantId;
  
      SELECT * FROM Restaurants WHERE RestaurantId = @restaurantId;
  END
  </code></pre>
  
  <p>When I tried executing this stored procedure by using the code snippet below, <strong>It worked</strong> as expected.</p>
  
  <pre><code>   SqlParameter param1 = new SqlParameter("@p0",restaurant.RestaurantId);
     SqlParameter param2 = new SqlParameter("@p1", restaurant.RestaurantName);
     SqlParameter param3 = new SqlParameter("@p2", restaurant.Location.LocationId);
  
       var res = _context.Restaurants
      .FromSqlRaw("UpdateRestaurantInformation @p0,@p1,@p2", param1, param2, param3)
      .ToList();
  </code></pre>
  
  <p>But when I tried using FromSqlInterpolated like this below:</p>
  
  <pre><code>var res = await _context.Restaurants
     .FromSqlInterpolated(
     $"UpdateRestaurantInformation {restaurant.RestaurantId}, {restaurant.RestaurantName}, {restaurant.Location.LocationId}")
     .SingleAsync();
  </code></pre>
  
  <p><strong>It's throwing this exception :</strong></p>
  
  <blockquote>
    <p>SqlException: Incorrect syntax near '@p0'.
    Microsoft.Data.SqlClient.SqlCommand+&lt;>c.b__164_0(Task
    result)</p>
  </blockquote>
  
  <p>What am I mistaking here? Please, somebody help me.</p>