Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TourDataManager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill
TourDataManager
Commits
1ab47d25
Commit
1ab47d25
authored
Oct 10, 2018
by
Kirill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQLite (sqlite-net-pcl)
parent
bd519fc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
4 deletions
+80
-4
Db.cs
TourDataManager/Db.cs
+36
-0
TourDataManager.csproj
TourDataManager/TourDataManager.csproj
+32
-0
packages.config
TourDataManager/packages.config
+9
-1
Program.cs
TourDataManagerConsoleApplication/Program.cs
+3
-3
No files found.
TourDataManager/Db.cs
0 → 100644
View file @
1ab47d25
using
System
;
using
System.IO
;
using
SQLite
;
namespace
TourDataManager
{
public
class
Stock
{
[
PrimaryKey
,
AutoIncrement
]
public
int
Id
{
get
;
set
;
}
public
string
Symbol
{
get
;
set
;
}
}
public
class
Valuation
{
[
PrimaryKey
,
AutoIncrement
]
public
int
Id
{
get
;
set
;
}
[
Indexed
]
public
int
StockId
{
get
;
set
;
}
public
DateTime
Time
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
}
public
class
Db
{
public
Db
(
string
rootPath
){
// Get an absolute path to the database file
var
databasePath
=
Path
.
Combine
(
rootPath
,
"sandbox.sqlite"
);
var
db
=
new
SQLiteConnection
(
databasePath
);
db
.
CreateTable
<
Stock
>();
db
.
CreateTable
<
Valuation
>();
}
}
}
\ No newline at end of file
TourDataManager/TourDataManager.csproj
View file @
1ab47d25
...
...
@@ -38,6 +38,26 @@
<HintPath>
..\packages\Ninject.3.3.4\lib\net45\Ninject.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"SQLite-net, Version=1.5.231.0, Culture=neutral, PublicKeyToken=null"
>
<HintPath>
..\packages\sqlite-net-pcl.1.5.231\lib\netstandard1.1\SQLite-net.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"SQLitePCLRaw.batteries_green, Version=1.1.11.121, Culture=neutral, PublicKeyToken=a84b7dcfb1391f7f"
>
<HintPath>
..\packages\SQLitePCLRaw.bundle_green.1.1.11\lib\net45\SQLitePCLRaw.batteries_green.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"SQLitePCLRaw.batteries_v2, Version=1.1.11.121, Culture=neutral, PublicKeyToken=8226ea5df37bcae9"
>
<HintPath>
..\packages\SQLitePCLRaw.bundle_green.1.1.11\lib\net45\SQLitePCLRaw.batteries_v2.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"SQLitePCLRaw.core, Version=1.1.11.121, Culture=neutral, PublicKeyToken=1488e028ca7ab535"
>
<HintPath>
..\packages\SQLitePCLRaw.core.1.1.11\lib\net45\SQLitePCLRaw.core.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"SQLitePCLRaw.provider.e_sqlite3, Version=1.1.11.121, Culture=neutral, PublicKeyToken=9c301db686d0bd12"
>
<HintPath>
..\packages\SQLitePCLRaw.provider.e_sqlite3.net45.1.1.11\lib\net45\SQLitePCLRaw.provider.e_sqlite3.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.ComponentModel.Composition"
/>
<Reference
Include=
"System.Core"
/>
...
...
@@ -94,6 +114,7 @@
<ItemGroup>
<Compile
Include=
"Authenticator.cs"
/>
<Compile
Include=
"CookieStorage.cs"
/>
<Compile
Include=
"Db.cs"
/>
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"IAuthenticator.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
...
...
@@ -103,6 +124,17 @@
<None
Include=
"packages.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets"
Condition=
"Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')"
/>
<Target
Name=
"EnsureNuGetPackageBuildImports"
BeforeTargets=
"PrepareForBuild"
>
<PropertyGroup>
<ErrorText>
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.
</ErrorText>
</PropertyGroup>
<Error
Condition=
"!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets'))"
/>
<Error
Condition=
"!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets'))"
/>
<Error
Condition=
"!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets'))"
/>
</Target>
<Import
Project=
"..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets"
Condition=
"Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')"
/>
<Import
Project=
"..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets"
Condition=
"Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.11\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.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.
<Target Name="BeforeBuild">
...
...
TourDataManager/packages.config
View file @
1ab47d25
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Ninject"
version
=
"3.3.4"
targetFramework
=
"net472"
/>
<!--
START
sqlite
-
net
-
pcl
-->
<
package
id
=
"sqlite-net-pcl"
version
=
"1.5.231"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.bundle_green"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.core"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.lib.e_sqlite3.linux"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.lib.e_sqlite3.osx"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.lib.e_sqlite3.v110_xp"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<
package
id
=
"SQLitePCLRaw.provider.e_sqlite3.net45"
version
=
"1.1.11"
targetFramework
=
"net472"
/>
<!--
END
sqlite
-
net
-
pcl
-->
<
package
id
=
"System.IO"
version
=
"4.3.0"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Net.Http"
version
=
"4.3.3"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Reactive"
version
=
"4.1.1"
targetFramework
=
"net472"
/>
...
...
@@ -11,5 +20,4 @@
<
package
id
=
"System.Security.Cryptography.Primitives"
version
=
"4.3.0"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Security.Cryptography.X509Certificates"
version
=
"4.3.0"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Threading.Tasks.Extensions"
version
=
"4.5.1"
targetFramework
=
"net472"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.4.0"
targetFramework
=
"net472"
/>
</
packages
>
\ No newline at end of file
TourDataManagerConsoleApplication/Program.cs
View file @
1ab47d25
...
...
@@ -11,10 +11,10 @@ namespace TourDataManagerConsoleApplication {
public
static
void
Main
(
string
[]
args
){
var
tourDataManager
=
new
TourDataManager
.
TourDataManager
(
PersistentPath
);
tourDataManager
.
Login
(
defaultLogin
,
defaultPassword
);
//var tourDataManager = new TourDataManager.TourDataManager(PersistentPath);
//tourDataManager.Login(defaultLogin, defaultPassword);
new
Db
(
PersistentPath
);
Console
.
Read
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment