Esempio n. 1
0
        static void Main(string[] args)
        {
            _context.Database.EnsureCreated();
            _context.GetService <ILoggerFactory>().AddProvider(new MyLoggerProvider());

            // InsertNewPkFkGraph();
            // ModuleForMethods.RunAll();
            //AddRooms();
            // AddManyToManyWithFks();
            //AddManyToManyWithObjects();
            // Console.WriteLine("test");

            //AnonymousTypeViaProjectiom();
            DisconnectedMethods.AddGraphAllNew();
            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            _context.Database.EnsureCreated();
            _context.GetService <ILoggerFactory>().AddProvider(new MyLoggerProvider());

            // InsertNewPkFkGraph();
            //InsertNewPkFkGraphMultipleChildren();
            // InsertNewOneToOneGraph();
            //AddChildToExistingObjectWhileTracked();
            //AddOneToOneToExistingObjectWhileTracked();
            //AddBattles();
            //AddManyToManyWithFks();
            //EagerLoadWithInclude();
            //EagerLoadManyToManyAkaChildrenGrandchildren();
            //EagerLoadFilteredManyToManyAkaChildrenGrandchildren();
            //EagerLoadWithMultipleBranches();
            //EagerLoadWithFromSql();
            //EagerLoadViaProjection();
            //EagerLoadAllOrNothingChildrenNope();
            //AnonymousTypeViaProjection();
            //AnonymousTypeViaProjectionWithRelated();
            //RelatedObjectsFixUp();
            //EagerLoadViaProjectionNotQuite();
            //EagerLoadViaProjectionAndScalars();
            //FilteredEagerLoadViaProjectionNope();
            //ExplicitLoad();
            //ExplicitLoadWithChildFilter();
            // UsingRelatedDataForFiltersAndMore();
            // DisconnectedMethods.VerifyingThatOrphanedNewChildDoesntGetSentToDatabase();
#if false
            DisconnectedMethods.AddGraphAllNew();
            DisconnectedMethods.AddGraphWithKeyValues();

            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.AttachGraphAllNew();
            DisconnectedMethods.AttachGraphWithKeys();


            Console.ReadKey(true);
            Console.WriteLine("__________________________");

            DisconnectedMethods.UpdateGraphAllNew();
            DisconnectedMethods.UpdateGraphWithKeys();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");

            DisconnectedMethods.DeleteGraphAllNew();
            DisconnectedMethods.DeleteGraphWithKeys();
#endif
#if false
            DisconnectedMethods.AddGraphViaEntryAllNew();
            DisconnectedMethods.AddGraphViaEntryWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.AttachGraphViaEntryAllNew();
            DisconnectedMethods.AttachGraphViaEntryWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.UpdateGraphViaEntryAllNew();
            DisconnectedMethods.UpdateGraphViaEntryWithKeyValues();
            Console.WriteLine("__________________________");
            DisconnectedMethods.DeleteGraphViaEntryAllNew();
            DisconnectedMethods.DeleteGraphViaEntryWithKeyValues();
#endif
            // DisconnectedMethods.ChangeStateUsingEntry();
#if false
            DisconnectedMethods.AddGraphViaTrackGraphAllNew();
            DisconnectedMethods.AddGraphViaTrackGraphWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.AttachGraphViaTrackGraphAllNew();
            DisconnectedMethods.AttachGraphViaTrackGraphWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.UpdateGraphViaTrackGraphAllNew();
            DisconnectedMethods.UpdateGraphViaTrackGraphWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
            DisconnectedMethods.DeleteGraphViaTrackGraphAllNew();
            DisconnectedMethods.DeleteGraphViaTrackGraphWithKeyValues();
            Console.ReadKey(true);
            Console.WriteLine("__________________________");
#endif
            DisconnectedMethods.StartTrackingUsingCustomFunction();

            #region inactive methods

            //FullGraphDisconnected
            //EditElementsOfGraph();
            //CompareEntryWithDbSetMethods()
            //DeleteRelatedObjects();

            #endregion
        }