summaryrefslogtreecommitdiffstats
path: root/samples/OAuthServiceProvider/Default.aspx.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-05-08 07:43:13 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-05-08 07:43:13 -0700
commit3a5a761063327f919d72d04e47968c8556a6fd36 (patch)
tree962b5692889ff320985c3862b08a1527798a116f /samples/OAuthServiceProvider/Default.aspx.cs
parent1be3ed304dcf79725ca099f8df54a601c26e145b (diff)
downloadDotNetOpenAuth-3a5a761063327f919d72d04e47968c8556a6fd36.zip
DotNetOpenAuth-3a5a761063327f919d72d04e47968c8556a6fd36.tar.gz
DotNetOpenAuth-3a5a761063327f919d72d04e47968c8556a6fd36.tar.bz2
StyleCop fixes.
Diffstat (limited to 'samples/OAuthServiceProvider/Default.aspx.cs')
-rw-r--r--samples/OAuthServiceProvider/Default.aspx.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/samples/OAuthServiceProvider/Default.aspx.cs b/samples/OAuthServiceProvider/Default.aspx.cs
index a08a2d2..653046a 100644
--- a/samples/OAuthServiceProvider/Default.aspx.cs
+++ b/samples/OAuthServiceProvider/Default.aspx.cs
@@ -9,17 +9,18 @@
public partial class _Default : System.Web.UI.Page {
protected void createDatabaseButton_Click(object sender, EventArgs e) {
- string dbPath = Path.Combine(Server.MapPath(Request.ApplicationPath), "App_Data");
- if (!Directory.Exists(dbPath)) {
- Directory.CreateDirectory(dbPath);
+ string databasePath = Path.Combine(Server.MapPath(Request.ApplicationPath), "App_Data");
+ if (!Directory.Exists(databasePath)) {
+ Directory.CreateDirectory(databasePath);
}
- string connectionString = ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString.Replace("|DataDirectory|", dbPath);
+ string connectionString = ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString.Replace("|DataDirectory|", databasePath);
var dc = new DataClassesDataContext(connectionString);
if (dc.DatabaseExists()) {
dc.DeleteDatabase();
}
try {
dc.CreateDatabase();
+
// Fill with sample data.
dc.OAuthConsumers.InsertOnSubmit(new OAuthConsumer {
ConsumerKey = "sampleconsumer",
@@ -37,7 +38,7 @@
});
dc.SubmitChanges();
- databaseStatus.Visible = true;
+ this.databaseStatus.Visible = true;
} catch (System.Data.SqlClient.SqlException ex) {
foreach (System.Data.SqlClient.SqlError error in ex.Errors) {
Response.Write(error.Message);