예제 #1
0
        private static async Task Oracle_Insert_Async()
        {
            MEZUNBOL b = new MEZUNBOL();
           // b.KOD = 12333;
            b.MEZUNA = "Oracle Insert";

             //Console.WriteLine(await Util_Oracle.Adapter.InsertAsync(b) + " - " + b.MEZUNBOLK);
             //Console.WriteLine(await Util_Oracle.Adapter.InsertAsync(b, "MEZUNA") + " - " + b.MEZUNBOLK);
             Console.WriteLine(await Util_Oracle.Adapter.InsertAsync(b, m => m.MEZUNA) + " - " + b.MEZUNBOLK);
        }
예제 #2
0
        private static void Oracle_Insert()
        {
            MEZUNBOL b = new MEZUNBOL();
            b.KOD = 12333;
            b.MEZUNA = "Oracle Insert";

            //Console.WriteLine(Util_Oracle.Adapter.Insert(b) + " - " + b.MEZUNBOLK);
           // Console.WriteLine(Util_Oracle.Adapter.Insert(b, "MEZUNA", "KOD") + " - " + b.MEZUNBOLK);
            Console.WriteLine(Util_Oracle.Adapter.Insert(b, m => m.MEZUNA, m => m.KOD) + " - " + b.MEZUNBOLK);
        }
예제 #3
0
        private static void Insert()
        {
            MEZUNBOL b = new MEZUNBOL();
            b.KOD = 12333;
            b.MEZUNA = "SQLite Insert";

            for (int j = 0; j < 1; ++j)
                Console.WriteLine(Util.Adapter.Insert(b) + " - " + b.MEZUNBOLK);
        }
예제 #4
0
 /// <summary>
 /// Create a new MEZUNBOL object.
 /// </summary>
 /// <param name="mEZUNBOLK">Initial value of the MEZUNBOLK property.</param>
 /// <param name="mEZUNA">Initial value of the MEZUNA property.</param>
 /// <param name="kOD">Initial value of the KOD property.</param>
 public static MEZUNBOL CreateMEZUNBOL(global::System.Int32 mEZUNBOLK, global::System.String mEZUNA, global::System.Int32 kOD)
 {
     MEZUNBOL mEZUNBOL = new MEZUNBOL();
     mEZUNBOL.MEZUNBOLK = mEZUNBOLK;
     mEZUNBOL.MEZUNA = mEZUNA;
     mEZUNBOL.KOD = kOD;
     return mEZUNBOL;
 }
예제 #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MEZUNBOLs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMEZUNBOLs(MEZUNBOL mEZUNBOL)
 {
     base.AddObject("MEZUNBOLs", mEZUNBOL);
 }
예제 #6
0
        private static void Oracle_Upsert_Insert()
        {
            MEZUNBOL b = new MEZUNBOL();
            b.KOD = 12333;
            b.MEZUNA = "Oracle Upsert";

          //  Console.WriteLine(Util_Oracle.Adapter.Upsert(b) + " - " + b.MEZUNBOLK);
          //  Console.WriteLine(Util_Oracle.Adapter.Upsert(b, new string[] { "KOD" }, new string[] { "MEZUNA" }) + " - " + b.MEZUNBOLK);

            Expression<Func<MEZUNBOL, object>>[] updatedFields = new Expression<Func<MEZUNBOL, object>>[] { m => m.KOD };
            Expression<Func<MEZUNBOL, object>>[] insertFields = new Expression<Func<MEZUNBOL, object>>[] { m => m.MEZUNA};

            Console.WriteLine(Util_Oracle.Adapter.Upsert(b, updatedFields, insertFields) + " - " + b.MEZUNBOLK);
        }
예제 #7
0
        private static async Task Oracle_BatchUpsert_Insert_Async()
        {
            const int entityCount = 3;

            List<MEZUNBOL> list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }

            Expression<Func<MEZUNBOL, object>>[] updatedFields = new Expression<Func<MEZUNBOL, object>>[] { m => m.KOD };
            Expression<Func<MEZUNBOL, object>>[] insertFields = new Expression<Func<MEZUNBOL, object>>[] { m => m.MEZUNA };

            Console.WriteLine(await Util_Oracle.Adapter.BatchUpsertAsync(list, BatchCommandMode.Batch, updatedFields, insertFields));

            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }


            list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }
            Console.WriteLine(await Util_Oracle.Adapter.BatchUpsertAsync(list, BatchCommandMode.Single, updatedFields, insertFields));
            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }
        }
예제 #8
0
        private static void Oracle_BatchUpsert_Insert()
        {
            const int entityCount = 3;

            List<MEZUNBOL> list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }

            Console.WriteLine(Util_Oracle.Adapter.BatchUpsert(list, BatchCommandMode.Batch, new string[] { "MEZUNA" }, null));
            //Console.WriteLine(Util_Oracle.Adapter.BatchUpsert(list, BatchCommandMode.Batch));

            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }


            list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }
            Console.WriteLine(Util_Oracle.Adapter.BatchUpsert(list, BatchCommandMode.Single, new string[] { "MEZUNA" }, null));
           // Console.WriteLine(Util_Oracle.Adapter.BatchUpsert(list, BatchCommandMode.Single));
            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }
        }
예제 #9
0
        private static async Task Oracle_BatchInsert_Async()
        {
            const int entityCount = 2;

            List<MEZUNBOL> list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }

            Console.WriteLine(await Util_Oracle.Adapter.BatchInsertAsync(list, m => m.MEZUNA));

            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }


            list = new List<MEZUNBOL>();
            for (int j = 0; j < entityCount; ++j)
            {
                MEZUNBOL b = new MEZUNBOL();
                b.KOD = j;
                b.MEZUNA = j.ToString();

                list.Add(b);
            }
            Console.WriteLine(await Util_Oracle.Adapter.BatchInsertAsync(list, BatchCommandMode.Single));
            foreach (MEZUNBOL item in list)
            {
                Console.WriteLine(item.MEZUNBOLK);
            }
        }