Npqsql upgrade, and Blog post visibility edition

* NpgsqlBlogProvider.cs:
* NpgsqlCircleProvider.cs: Fixes the sql command preparation

* App.master: Circles edition needs also this lib, all pages will need
  it ...

* Edit.aspx: Restores the post visibility control

* Web.config: Fixes the new connection string, the `Encoding`
  parameter is no more supported.

* Web.csproj: Nuget packages updating

* packages.config: Nuget packages updating
This commit is contained in:
Paul Schneider
2015-09-27 23:18:28 +02:00
parent f4329d6176
commit 2cae8582f8
10 changed files with 73 additions and 47 deletions

View File

@ -1,3 +1,7 @@
2015-09-27 Paul Schneider <paul@pschneider.fr>
* NpgsqlBlogProvider.cs: Fixes the sql command preparation
2015-09-23 Paul Schneider <paul@pschneider.fr>
* NpgsqlBlogProvider.cs: refactoring: The `UserName` property

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using Yavsc.Model.Blogs;
using Yavsc.Model.Circles;
using System.Web.Mvc;
using NpgsqlTypes;
namespace Npgsql.Web.Blog
{
@ -286,9 +287,9 @@ namespace Npgsql.Web.Blog
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
cmd.CommandText = "select _id,bcontent,modified,posted,visible from blog " +
"where applicationname = :appname and username = :username and title = :title";
cmd.Parameters.AddWithValue ("appname", applicationName);
cmd.Parameters.AddWithValue ("username", username);
cmd.Parameters.AddWithValue ("title", title);
cmd.Parameters.AddWithValue ("appname", NpgsqlDbType.Varchar, applicationName);
cmd.Parameters.AddWithValue ("username", NpgsqlDbType.Varchar ,username);
cmd.Parameters.AddWithValue ("title", NpgsqlDbType.Varchar, title);
cnx.Open ();
cmd.Prepare ();
using (NpgsqlDataReader rdr = cmd.ExecuteReader ()) {