Exemple #1
0
        public async Task Scenario()
        {
            await TestDbContext.ExecAsync(context => {
                var dbSet = context.Set <DataItem>();

                dbSet.AddRange(RemoteGroupCountTestHelper.GenerateTestData(() => new DataItem()));
                context.SaveChanges();

                RemoteGroupCountTestHelper.Run(dbSet);
            });
        }
        public async Task Scenario()
        {
            await SessionFactoryHelper.ExecAsync(session => {
                foreach (var i in RemoteGroupCountTestHelper.GenerateTestData(() => new DataItem()))
                {
                    session.Save(i);
                }

                RemoteGroupCountTestHelper.Run(session.Query <DataItem>());
            });
        }
        public async Task Scenario()
        {
            await UnitOfWorkHelper.ExecAsync(uow => {
                foreach (var i in RemoteGroupCountTestHelper.GenerateTestData(() => new DataItem()))
                {
                    uow.Save(i);
                }
                uow.CommitChanges();

                RemoteGroupCountTestHelper.Run(uow.Query <DataItem>());
            });
        }
Exemple #4
0
        public void Scenario()
        {
            TestDataContext.Exec(context => {
                var table = context.RemoteGroupCount_DataItems;

                foreach (var i in RemoteGroupCountTestHelper.GenerateTestData(() => new DataItem()))
                {
                    table.InsertOnSubmit(i);
                }
                context.SubmitChanges();

                RemoteGroupCountTestHelper.Run(table);
            });
        }