Skip to content

Commit

Permalink
Fix some sample issues (#4057)
Browse files Browse the repository at this point in the history
Fixes #4054
Fixes #4055
  • Loading branch information
roji committed Sep 26, 2022
1 parent c02dcae commit 0a06aca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions samples/core/Querying/Pagination/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ internal class Program
{
private static void Main(string[] args)
{
using (var context = new BloggingContext())
{
context.Database.EnsureDeleted();
context.Database.EnsureCreated();
}

using (var context = new BloggingContext())
{
#region OffsetPagination
Expand Down
4 changes: 2 additions & 2 deletions samples/core/Querying/SqlQueries/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ from [Post] as [p]
using (var context = new BloggingContext())
{
#region FromSqlRawStoredProcedureParameter
var columnName = "Name";
var columnValue = new SqlParameter("propertyValue", "johndoe");
var columnName = "Url";
var columnValue = new SqlParameter("columnValue", "http://SomeURL");

var blogs = context.Blogs
.FromSqlRaw($"SELECT * FROM [Blogs] WHERE {columnName} = @columnValue", columnValue)
Expand Down

0 comments on commit 0a06aca

Please sign in to comment.