Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: benjaminplee/DotNetSandBox
base: 56c82028f5
...
head fork: benjaminplee/DotNetSandBox
compare: faeb7210da
  • 3 commits
  • 13 files changed
  • 0 commit comments
  • 1 contributor
3  .gitignore
View
@@ -1,4 +1,5 @@
[Oo]bj
[Bb]in
_Resharper.*
-*.suo
+*.suo
+*.user
21 Console/Console.csproj
View
@@ -40,6 +40,12 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
+ <Reference Include="System.Data.SQLite">
+ <HintPath>..\lib\sqlite\System.Data.SQLite.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Data.SQLite.Linq">
+ <HintPath>..\lib\sqlite\System.Data.SQLite.Linq.dll</HintPath>
+ </Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -50,6 +56,21 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <None Include="db\database.sqlite">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="..\lib\sqlite\SQLite.Interop.dll">
+ <Link>SQLite.Interop.dll</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ <Content Include="..\lib\sqlite\SQLite.Interop.pdb">
+ <Link>SQLite.Interop.pdb</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
6 Console/Console.csproj.user
View
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
+</Project>
22 Console/Program.cs
View
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Data.SQLite;
namespace Console
{
@@ -9,6 +6,23 @@ class Program
{
static void Main(string[] args)
{
+ const string connString = "Data Source=db\\database.sqlite";
+
+ using (var conn = new SQLiteConnection(connString))
+ {
+ using (var cmd = new SQLiteCommand("SELECT * FROM CUSTOMER", conn))
+ {
+ conn.Open();
+
+ using (var dr = cmd.ExecuteReader())
+ {
+ while (dr.Read())
+ {
+ System.Console.WriteLine(dr.GetValue(0) + " " + dr.GetValue(1));
+ }
+ }
+ }
+ }
}
}
}
BIN  Console/db/database.sqlite
View
Binary file not shown
BIN  lib/sqlite/SQLite.Interop.dll
View
Binary file not shown
BIN  lib/sqlite/SQLite.Interop.pdb
View
Binary file not shown
BIN  lib/sqlite/System.Data.SQLite.Linq.dll
View
Binary file not shown
BIN  lib/sqlite/System.Data.SQLite.Linq.pdb
View
Binary file not shown
1,981 lib/sqlite/System.Data.SQLite.Linq.xml
View
1,981 additions, 0 deletions not shown
BIN  lib/sqlite/System.Data.SQLite.dll
View
Binary file not shown
BIN  lib/sqlite/System.Data.SQLite.pdb
View
Binary file not shown
4,924 lib/sqlite/System.Data.SQLite.xml
View
4,924 additions, 0 deletions not shown

No commit comments for this range

Something went wrong with that request. Please try again.