public void UpdateLastChangeDoc(LastChangeOfDoc doc) { using (var db = this.factory.CreateReadOnly()) using (var command = db.Database.GetDbConnection().CreateCommand()) { command.CommandType = CommandType.Text; command.CommandText = @"update doc_langs set eucases_change_date = @_eu_lc_date where doc_langs.doc_identifier = @_ident"; command.Parameters.Add(new Npgsql.NpgsqlParameter("@_eu_lc_date", NpgsqlTypes.NpgsqlDbType.Date) { Value = doc.LastChangeDate }); command.Parameters.Add(new Npgsql.NpgsqlParameter("@_ident", NpgsqlTypes.NpgsqlDbType.Varchar) { Value = doc.Ident }); if (command.Connection.State == ConnectionState.Closed) { command.Connection.Open(); } command.ExecuteNonQuery(); } }
public void UpdateLastChangeDoc(LastChangeOfDoc doc) { this.dbHelper.UpdateLastChangeDoc(doc); }