public async Task GetAllIncludingUserAsync()
        {
            var user = await userEntityFramework.AddAsync(builder.CreateUserWithTasks(2));

            var tasks  = user.TasksToDo;
            var result = await taskToDoEntityFramework.GetAllIncludingUserAsync();

            Assert.AreEqual(result.FirstOrDefault().UserId, user.Id);
            Assert.AreEqual(result.LastOrDefault().UserId, user.Id);
        }
Beispiel #2
0
        public async Task GetAllIncludingUserAsync()
        {
            var user = await userDapper.AddAsync(userBuilder.CreateUser());

            var task = await taskToDoDapper.AddRangeAsync(taskToDoBuilder.CreateTaskToDoListWithUser(2, user.Id));

            var result = await taskToDoDapper.GetAllIncludingUserAsync();

            Assert.AreEqual(result.FirstOrDefault().UserId, user.Id);
            Assert.AreEqual(result.LastOrDefault().UserId, user.Id);
        }
Beispiel #3
0
        public async Task GetAllIncludingUserAsync()
        {
            using (var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                var conn = databaseOptions.GetDbConnection;
                userDapper     = new UserRepository(conn);
                taskToDoDapper = new TaskToDoRepository(conn);

                var user = await userDapper.AddAsync(userBuilder.CreateUser());

                var task = await taskToDoDapper.AddRangeAsync(taskToDoBuilder.CreateTaskToDoListWithUser(2, user.Id));

                var result = await taskToDoDapper.GetAllIncludingUserAsync();

                Assert.AreEqual(result.FirstOrDefault().UserId, user.Id);
                Assert.AreEqual(result.LastOrDefault().UserId, user.Id);
            }
        }
 public async Task <IEnumerable <TaskToDo> > GetAllIncludingUserAsync()
 {
     return(await _repository.GetAllIncludingUserAsync());
 }