예제 #1
0
파일: Program.cs 프로젝트: majorsilence/Dev
        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));
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: majorsilence/Dev
        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));
            }
        }