Last active
December 14, 2017 10:35
-
-
Save georgehemmings/19a35a150cbc81c9070b6c62347aa182 to your computer and use it in GitHub Desktop.
OrmLite 4.5.14 AnonType
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Linq; | |
| using ServiceStack; | |
| using ServiceStack.Text; | |
| using ServiceStack.OrmLite; | |
| using ServiceStack.Data; | |
| public class Model | |
| { | |
| public int Id { get; set; } | |
| public byte[] Bytes { get; set; } | |
| } | |
| var dbFactory = new OrmLiteConnectionFactory( | |
| ":memory:", | |
| SqliteDialect.Provider); | |
| var db = dbFactory.Open(); | |
| db.DropAndCreateTable<Model>(); | |
| db.Insert(new Model | |
| { | |
| Bytes = 1.ToUtf8Bytes() | |
| }); | |
| db.Single<Model>(new | |
| { | |
| Bytes = 1.ToUtf8Bytes() | |
| }).PrintDump(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <packages> | |
| <package id="ServiceStack.Text" version="4.5.14" targetFramework="net45" /> | |
| <package id="ServiceStack.Client" version="4.5.14" targetFramework="net45" /> | |
| <package id="ServiceStack.Common" version="4.5.14" targetFramework="net45" /> | |
| <package id="ServiceStack.OrmLite" version="4.5.14" targetFramework="net45" /> | |
| <package id="ServiceStack.OrmLite.Sqlite" version="4.5.14" targetFramework="net45" /> | |
| <package id="System.Data.SQLite" version="1.0.106" targetFramework="net45" /> | |
| </packages> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment