Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from paulbatum/patch-1
Browse files Browse the repository at this point in the history
Fix sqlite data sample to not insert duplicate rows
  • Loading branch information
mikebluestein committed May 15, 2012
2 parents abf3bb1 + c289981 commit 125102c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Data/Screens/SQLiteNet/BasicOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ protected void CheckAndCreateDatabase (string dbName)
// create the tables
db.CreateTable<Person> ();

// skip inserting data if it already exists
if(db.Table<Person>().Count() > 0)
return;

// declare vars
List<Person> people = new List<Person> ();
Person person;
Expand Down

0 comments on commit 125102c

Please sign in to comment.