Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some sample issues #4057

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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