public void Test_RepositoryReadOnlyExtendedTSQL()
        {
            //Insert
            TestInsert10Cars();

            //Select a Randon index between 0 and 9 and get name selected
            int    ind     = new Random().Next(0, 9);
            string carname = carnames[ind];

            //Create Repository ReadOnly
            Dictionary <string, Type> fieldIdName = new Dictionary <string, Type>();

            fieldIdName.Add("id", typeof(int));
            IRepositoryReadOnlyExtendedTSQL <Car> RoRepository = new InternalRepository <Car, ConnectionContext>(myUow, tablename, fieldIdName);

            try
            {
                //Count
                Assert.AreEqual(10, RoRepository.Count($"SELECT * FROM {tablename}"));

                //Exists
                Assert.AreEqual(true, RoRepository.Exists($"SELECT * FROM {tablename} WHERE name = '{carname}'"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                //Delete
                TestClearCars();
            }
        }
        public void Test_RepositoryReadOnlyExtended()
        {
            //Insert
            TestInsert10Cars();

            //Select a Randon index between 0 and 9 and get name selected
            int    ind     = new Random().Next(0, 9);
            string carname = carnames[ind];

            //Create Repository ReadOnly
            Dictionary <string, Type> fieldIdName = new Dictionary <string, Type>();

            fieldIdName.Add("id", typeof(int));
            IRepositoryReadOnlyExtended <Car> RoRepository = new InternalRepository <Car, ConnectionContext>(myUow, tablename, fieldIdName);

            try
            {
                //Reload
                Car Car_ind = new Car {
                    id = ind + 1
                };
                RoRepository.Reload(ref Car_ind);

                Assert.AreEqual(carname, Car_ind.name);

                //Count
                Assert.AreEqual(10, RoRepository.Count());

                //Exists
                Assert.AreEqual(true, RoRepository.Exists(f => f.name == carname));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                //Delete
                TestClearCars();
            }
        }