Exemplo n.º 1
0
        static void DoIt()
        {
            Store storey = new Store();

            var thingy = BuildMeOne();

            var id = storey.Create(thingy);

            storey.SaveChanges();

            var rebuilt = storey.TryRetrieve <SimplePoco>(id);

            rebuilt.RootName = "Update now!!!";
            storey.Update(id, rebuilt);
            storey.SaveChanges();

            //storey.Delete<SimplePoco>(id);
            //storey.SaveChanges();
            var firstEntryId = (new NoSQLContext()).Store.OrderBy(a => a.DateCreated).First().StoreId;
            var firstItem    = StoreUtility.TryRetrieve <SimplePoco>(firstEntryId);

            firstItem.RootName += " and reborn!!!";
            StoreUtility.Update(firstEntryId, firstItem);

            Console.ReadKey();
        }