Exemple #1
0
        public static void ContribSelectData(UserId id)
        {
            using (var connection = new System.Data.SQLite.SQLiteConnection(cnStr))
            {
                connection.Open();
                var data = connection.Get<Poco.Users>(id);

                System.Diagnostics.Debug.Assert(id.Equals(data.Id));
            }
        }
Exemple #2
0
        public static void SelectData(UserId id)
        {
            using (var connection = new System.Data.SQLite.SQLiteConnection(cnStr))
            {
                connection.Open();
                var data = connection.Query<Poco.Users>("SELECT * FROM Users WHERE Id = @Id",
                    new  { Id = id }).FirstOrDefault();

                System.Diagnostics.Debug.Assert(id.Equals(data.Id));
            }
        }