Ejemplo n.º 1
0
        public void Intialize_With_Injected_Context()
        {
            var context = new SqlCeCache(_connectionStringName);

            _sqlStore = new SqlCeStore <Client>(context);
            Assert.True(_sqlStore != null && _sqlStore.Cache.DbTableNames.Count > 0);
        }
Ejemplo n.º 2
0
        public void MapingSpecifiedPk()
        {
            var db = new SqlCeStore<Album>(_connectionStringName);  //, "Album"

            var pkMap = db.PrimaryKeyMapping;
            Assert.Equal("Id", pkMap.PropertyName);
            Assert.Equal("AlbumId", pkMap.ColumnName);
            Assert.True(pkMap.IsAutoIncementing);
        }
Ejemplo n.º 3
0
        public void MapingNotSpecifiedPk()
        {
            var db = new SqlCeStore <Genre>(_connectionStringName); //, "Genre"

            var pkMap = db.PrimaryKeyMapping;

            Assert.Equal("Id", pkMap.PropertyName);
            Assert.Equal("GenreId", pkMap.ColumnName);
            Assert.True(pkMap.IsAutoIncementing);
        }
Ejemplo n.º 4
0
        public void MapingNotSpecifiedPk()
        {
            var db = new SqlCeStore<Genre>(_connectionStringName);  //, "Genre"

              var pkMap = db.TableMapping.PrimaryKeyMapping;
              Assert.Single(pkMap);
              Assert.Equal("Id", pkMap[0].PropertyName);
              Assert.Equal("GenreId", pkMap[0].ColumnName);
              Assert.True(pkMap[0].IsAutoIncementing);
        }
Ejemplo n.º 5
0
        public void PullsThingsDynamically()
        {
            var list    = new SqlCeStore <dynamic>(_connectionStringName);
            var results = list.Query(@"select Artist.Name AS ArtistName, Track.Name, Track.UnitPrice
                                   from Artist inner join
                                   Album on Artist.ArtistId = Album.ArtistId inner join
                                   Track on Album.AlbumId = Track.AlbumId
                                   where (Artist.Name = @0)", "ac/dc");

            Assert.True(results.Count() > 0);
        }
Ejemplo n.º 6
0
        public void MapingSpecifiedPk()
        {
            var db = new SqlCeStore <Album>(_connectionStringName); //, "Album"

            var pkMap = db.TableMapping.PrimaryKeyMapping;

            Assert.Single(pkMap);
            Assert.Equal("Id", pkMap[0].PropertyName);
            Assert.Equal("AlbumId", pkMap[0].ColumnName);
            Assert.True(pkMap[0].IsAutoIncementing);
        }
Ejemplo n.º 7
0
 public void Intialize_With_Connection_String_Name()
 {
     _sqlStore = new SqlCeStore <Client>(_connectionStringName);
     Assert.True(_sqlStore != null && _sqlStore.Cache.DbTableNames.Count > 0);
 }
Ejemplo n.º 8
0
 public void Intialize_With_Injected_Context()
 {
     var context = new SqlCeCache(_connectionStringName);
       _sqlStore = new SqlCeStore<Client>(context);
       Assert.True(_sqlStore != null && _sqlStore.Cache.DbTableNames.Count > 0);
 }
Ejemplo n.º 9
0
 public void Intialize_With_Connection_String_Name()
 {
     _sqlStore = new SqlCeStore<Client>(_connectionStringName);
       Assert.True(_sqlStore != null && _sqlStore.Cache.DbTableNames.Count > 0);
 }
Ejemplo n.º 10
0
 public void PullsThingsDynamically()
 {
     var list = new SqlCeStore<dynamic>(_connectionStringName);
       var results = list.Query(@"select Artist.Name AS ArtistName, Track.Name, Track.UnitPrice
                            from Artist inner join
                            Album on Artist.ArtistId = Album.ArtistId inner join
                            Track on Album.AlbumId = Track.AlbumId
                            where (Artist.Name = @0)", "ac/dc");
       Assert.True(results.Count() > 0);
 }