SlideShare a Scribd company logo
1 of 18
http://shinichiaoyagi.blogspot.jp/
http://www.sqlite.org/
class Person {
                               [PrimaryKey, AutoIncrement]
                               public int Id { get; set; }

                               [MaxLength(20)]
                               public string Name { get; set; }
                        }




using (var con = new SQLiteConnection(
       Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path,
       "AdressBook.db")))
{
       con.CreateTable<Person>();
       con.Insert(new Person() { Name = "メトロ太郎" });
}
var persons = con.Query<Person>("select * from Person where Id = 1");




class Result
{
       public string Name { get; set; }
}

var names = con.Query<Result>("select Name from Person where Id = 1");
var person = con.Table<Person>().Where(x => x.Id == 1).First();
con.Execute("update Person set Name='WindowsRT' where Id=1");




var person = con.Table<Person>().Where(x => x.Id == 1).First();
person.Name = "Metro";
con.Update(person);
var con = new SQLiteAsyncConnection(
       Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path,
       "AdressBook.db"));
await con.CreateTableAsync<Person>();
await con.InsertAsync(new Person() { Name = "メトロ太郎" });

var person = await con.Table<Person>().Where(x => x.Id == 1).FirstAsync();
person.Name = "Metro";
await con.UpdateAsync(person);

await con.ExecuteAsync("update Person set Name='WindowsRT' where Id=1");

var persons = await con.Table<Person>().ToListAsync();
http://blogs.msdn.com/b/windowsappdev_ja/archive/2012/07/25/roaming.aspx
try
{
      var foamingfile =
          await Windows.Storage.ApplicationData.Current.RoamingFolder.GetFileAsync("AdressBook.db");
      await foamingfile.CopyAsync(Windows.Storage.ApplicationData.Current.LocalFolder);
}
catch (FileNotFoundException)
{
}




var localfile =
    await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync("AdressBook.db");
await localfile.CopyAsync(Windows.Storage.ApplicationData.Current.RoamingFolder);
http://msdn.microsoft.com/ja-jp/library/windows/apps/xaml/hh975357.aspx
http://www.microsoft.com/ja-jp/download/details.aspx?id=30674

More Related Content

What's hot

WAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in JavaWAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in JavaDaniel Doubrovkine
 
Fast content import in Plone
Fast content import in PloneFast content import in Plone
Fast content import in PloneAndrew Mleczko
 
Writing browser extensions_in_kotlin
Writing browser extensions_in_kotlinWriting browser extensions_in_kotlin
Writing browser extensions_in_kotlinxavazque2
 
Snapshot Testing @ CocoaheadsNL
Snapshot Testing @ CocoaheadsNLSnapshot Testing @ CocoaheadsNL
Snapshot Testing @ CocoaheadsNLLars Lockefeer
 
The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202Mahmoud Samir Fayed
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDBMongoDB
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2Takahiro Inoue
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤Takahiro Inoue
 
MongoDB NoSQL and all of its awesomeness
MongoDB NoSQL and all of its awesomenessMongoDB NoSQL and all of its awesomeness
MongoDB NoSQL and all of its awesomenessTroy Grosfield
 
Basic crud operation
Basic crud operationBasic crud operation
Basic crud operationzarigatongy
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genMongoDB
 
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBBuilding Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBGreat Wide Open
 

What's hot (20)

PageObject
PageObject PageObject
PageObject
 
WAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in JavaWAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in Java
 
Fast content import in Plone
Fast content import in PloneFast content import in Plone
Fast content import in Plone
 
Writing browser extensions_in_kotlin
Writing browser extensions_in_kotlinWriting browser extensions_in_kotlin
Writing browser extensions_in_kotlin
 
Waffle at NYCJavaSig
Waffle at NYCJavaSigWaffle at NYCJavaSig
Waffle at NYCJavaSig
 
Snapshot Testing @ CocoaheadsNL
Snapshot Testing @ CocoaheadsNLSnapshot Testing @ CocoaheadsNL
Snapshot Testing @ CocoaheadsNL
 
The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202
 
Using Dojo
Using DojoUsing Dojo
Using Dojo
 
Php5
Php5Php5
Php5
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
 
MongoDB NoSQL and all of its awesomeness
MongoDB NoSQL and all of its awesomenessMongoDB NoSQL and all of its awesomeness
MongoDB NoSQL and all of its awesomeness
 
Basic crud operation
Basic crud operationBasic crud operation
Basic crud operation
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
 
PhoneGap: Local Storage
PhoneGap: Local StoragePhoneGap: Local Storage
PhoneGap: Local Storage
 
Form1.vb
Form1.vbForm1.vb
Form1.vb
 
Building Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDBBuilding Your First App: An Introduction to MongoDB
Building Your First App: An Introduction to MongoDB
 
Indexing
IndexingIndexing
Indexing
 
React.js 20150828
React.js 20150828React.js 20150828
React.js 20150828
 

Viewers also liked

WindowsストアーアプリでSharpDXを動かしてみる
WindowsストアーアプリでSharpDXを動かしてみるWindowsストアーアプリでSharpDXを動かしてみる
WindowsストアーアプリでSharpDXを動かしてみるShinichiAoyagi
 
LINQ の概要とかもろもろ
LINQ の概要とかもろもろLINQ の概要とかもろもろ
LINQ の概要とかもろもろShinichiAoyagi
 
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~ShinichiAoyagi
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化Kumazaki Hiroki
 

Viewers also liked (6)

WindowsストアーアプリでSharpDXを動かしてみる
WindowsストアーアプリでSharpDXを動かしてみるWindowsストアーアプリでSharpDXを動かしてみる
WindowsストアーアプリでSharpDXを動かしてみる
 
XAML 入門
XAML 入門XAML 入門
XAML 入門
 
LINQ の概要とかもろもろ
LINQ の概要とかもろもろLINQ の概要とかもろもろ
LINQ の概要とかもろもろ
 
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
 
LINQ概要
LINQ概要LINQ概要
LINQ概要
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化
 

Similar to Windows ストアーアプリで SQLite を使ってみよう

An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring DataOliver Gierke
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using RoomNelson Glauber Leal
 
Creating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdfCreating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdfShaiAlmog1
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Oliver Gierke
 
Simple.Data intro slides
Simple.Data intro slidesSimple.Data intro slides
Simple.Data intro slidesMark Rendle
 
Creating a Facebook Clone - Part XXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXVIII - Transcript.pdfCreating a Facebook Clone - Part XXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXVIII - Transcript.pdfShaiAlmog1
 
Андрей Слободяник "Test driven development using mockito"
Андрей Слободяник "Test driven development using mockito"Андрей Слободяник "Test driven development using mockito"
Андрей Слободяник "Test driven development using mockito"Anna Shymchenko
 
Create methods to_insert
Create methods to_insertCreate methods to_insert
Create methods to_insertNayanBakhadyo
 
Entity Framework Core: tips and tricks
Entity Framework Core: tips and tricksEntity Framework Core: tips and tricks
Entity Framework Core: tips and tricksArturDr
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)shubhamvcs
 
Android Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, VonageAndroid Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, VonageDroidConTLV
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfShaiAlmog1
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020Thodoris Bais
 
Java programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarJava programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarROHIT JAISWAR
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMatteo Pagani
 

Similar to Windows ストアーアプリで SQLite を使ってみよう (20)

An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring Data
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using Room
 
greenDAO
greenDAOgreenDAO
greenDAO
 
Creating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdfCreating a Whatsapp Clone - Part XI.pdf
Creating a Whatsapp Clone - Part XI.pdf
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
 
Simple.Data intro slides
Simple.Data intro slidesSimple.Data intro slides
Simple.Data intro slides
 
Creating a Facebook Clone - Part XXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXVIII - Transcript.pdfCreating a Facebook Clone - Part XXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXVIII - Transcript.pdf
 
Андрей Слободяник "Test driven development using mockito"
Андрей Слободяник "Test driven development using mockito"Андрей Слободяник "Test driven development using mockito"
Андрей Слободяник "Test driven development using mockito"
 
Create methods to_insert
Create methods to_insertCreate methods to_insert
Create methods to_insert
 
Entity Framework Core: tips and tricks
Entity Framework Core: tips and tricksEntity Framework Core: tips and tricks
Entity Framework Core: tips and tricks
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)
 
PDFDemo
PDFDemoPDFDemo
PDFDemo
 
Android Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, VonageAndroid Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, Vonage
 
3 database-jdbc(1)
3 database-jdbc(1)3 database-jdbc(1)
3 database-jdbc(1)
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020
 
Excelsheet
ExcelsheetExcelsheet
Excelsheet
 
Java programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswarJava programming lab_manual_by_rohit_jaiswar
Java programming lab_manual_by_rohit_jaiswar
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applications
 

More from ShinichiAoyagi

WPF & Windows Forms on .NET Core 3.0
WPF & Windows Forms on .NET Core 3.0WPF & Windows Forms on .NET Core 3.0
WPF & Windows Forms on .NET Core 3.0ShinichiAoyagi
 
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -ShinichiAoyagi
 
Visual Studio 2015 + Xamarin
Visual Studio 2015 + XamarinVisual Studio 2015 + Xamarin
Visual Studio 2015 + XamarinShinichiAoyagi
 
Xamarin+MVVMCross のあれこれ
Xamarin+MVVMCross のあれこれXamarin+MVVMCross のあれこれ
Xamarin+MVVMCross のあれこれShinichiAoyagi
 
うるう秒とタイムゾーン
うるう秒とタイムゾーンうるう秒とタイムゾーン
うるう秒とタイムゾーンShinichiAoyagi
 
LINQ 概要 + 結構便利な LINQ to XML
LINQ 概要 + 結構便利な LINQ to XMLLINQ 概要 + 結構便利な LINQ to XML
LINQ 概要 + 結構便利な LINQ to XMLShinichiAoyagi
 
C# と .NET と ・・・
C# と .NET と ・・・C# と .NET と ・・・
C# と .NET と ・・・ShinichiAoyagi
 
メトロスタイルアプリ開発 最初の一歩
メトロスタイルアプリ開発最初の一歩メトロスタイルアプリ開発最初の一歩
メトロスタイルアプリ開発 最初の一歩ShinichiAoyagi
 
メトロスタイルってなに?
メトロスタイルってなに?メトロスタイルってなに?
メトロスタイルってなに?ShinichiAoyagi
 
ついに日本上陸!Windows Phone 7.5 アプリケーション開発
ついに日本上陸!Windows Phone 7.5 アプリケーション開発ついに日本上陸!Windows Phone 7.5 アプリケーション開発
ついに日本上陸!Windows Phone 7.5 アプリケーション開発ShinichiAoyagi
 

More from ShinichiAoyagi (10)

WPF & Windows Forms on .NET Core 3.0
WPF & Windows Forms on .NET Core 3.0WPF & Windows Forms on .NET Core 3.0
WPF & Windows Forms on .NET Core 3.0
 
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -
【18-C-5】C# で iOS/Androidアプリ開発 - Visual Studio 2015 + Xamarin + MVVMCross -
 
Visual Studio 2015 + Xamarin
Visual Studio 2015 + XamarinVisual Studio 2015 + Xamarin
Visual Studio 2015 + Xamarin
 
Xamarin+MVVMCross のあれこれ
Xamarin+MVVMCross のあれこれXamarin+MVVMCross のあれこれ
Xamarin+MVVMCross のあれこれ
 
うるう秒とタイムゾーン
うるう秒とタイムゾーンうるう秒とタイムゾーン
うるう秒とタイムゾーン
 
LINQ 概要 + 結構便利な LINQ to XML
LINQ 概要 + 結構便利な LINQ to XMLLINQ 概要 + 結構便利な LINQ to XML
LINQ 概要 + 結構便利な LINQ to XML
 
C# と .NET と ・・・
C# と .NET と ・・・C# と .NET と ・・・
C# と .NET と ・・・
 
メトロスタイルアプリ開発 最初の一歩
メトロスタイルアプリ開発最初の一歩メトロスタイルアプリ開発最初の一歩
メトロスタイルアプリ開発 最初の一歩
 
メトロスタイルってなに?
メトロスタイルってなに?メトロスタイルってなに?
メトロスタイルってなに?
 
ついに日本上陸!Windows Phone 7.5 アプリケーション開発
ついに日本上陸!Windows Phone 7.5 アプリケーション開発ついに日本上陸!Windows Phone 7.5 アプリケーション開発
ついに日本上陸!Windows Phone 7.5 アプリケーション開発
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Windows ストアーアプリで SQLite を使ってみよう

  • 1.
  • 3.
  • 4.
  • 5.
  • 7.
  • 8.
  • 9.
  • 10. class Person { [PrimaryKey, AutoIncrement] public int Id { get; set; } [MaxLength(20)] public string Name { get; set; } } using (var con = new SQLiteConnection( Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "AdressBook.db"))) { con.CreateTable<Person>(); con.Insert(new Person() { Name = "メトロ太郎" }); }
  • 11. var persons = con.Query<Person>("select * from Person where Id = 1"); class Result { public string Name { get; set; } } var names = con.Query<Result>("select Name from Person where Id = 1");
  • 12. var person = con.Table<Person>().Where(x => x.Id == 1).First();
  • 13. con.Execute("update Person set Name='WindowsRT' where Id=1"); var person = con.Table<Person>().Where(x => x.Id == 1).First(); person.Name = "Metro"; con.Update(person);
  • 14. var con = new SQLiteAsyncConnection( Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "AdressBook.db")); await con.CreateTableAsync<Person>(); await con.InsertAsync(new Person() { Name = "メトロ太郎" }); var person = await con.Table<Person>().Where(x => x.Id == 1).FirstAsync(); person.Name = "Metro"; await con.UpdateAsync(person); await con.ExecuteAsync("update Person set Name='WindowsRT' where Id=1"); var persons = await con.Table<Person>().ToListAsync();
  • 16. try { var foamingfile = await Windows.Storage.ApplicationData.Current.RoamingFolder.GetFileAsync("AdressBook.db"); await foamingfile.CopyAsync(Windows.Storage.ApplicationData.Current.LocalFolder); } catch (FileNotFoundException) { } var localfile = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync("AdressBook.db"); await localfile.CopyAsync(Windows.Storage.ApplicationData.Current.RoamingFolder);