예제 #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);
            });
        }
예제 #2
0
        public async Task Scenario()
        {
            await SessionFactoryHelper.ExecAsync(session => {
                foreach (var i in RemoteGroupCountTestHelper.GenerateTestData(() => new DataItem()))
                {
                    session.Save(i);
                }

                RemoteGroupCountTestHelper.Run(session.Query <DataItem>());
            });
        }
예제 #3
0
        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>());
            });
        }
예제 #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);
            });
        }