public async Task <IResult> DeleteAsync(long id)
        {
            await _ProgressRepository.DeleteAsync(id);

            await _unitOfWork.SaveChangesAsync();

            return(Result.Success());
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            foreach (var user in userRepository.GetAllAsync().Result)
            {
                userRepository.DeleteAsync(user.Id).Wait();
            }

            foreach (var course in courseeRepository.GetAllAsync().Result)
            {
                courseeRepository.DeleteAsync(course.Id).Wait();
            }

            foreach (var progress in progressRepository.GetAllAsync().Result)
            {
                progressRepository.DeleteAsync(progress.Id);
            }

            server.Dispose();
        }