예제 #1
0
 public static async Task <bool> DeleteAsync(IList <UserProblem> userProblems)
 {
     using (var userProblemRepository = new UserProblemRepository())
     {
         return(await userProblemRepository.DeleteAsync(userProblems));
     }
 }
예제 #2
0
 public static async Task <IList <UserProblem> > CreateAsync(IList <UserProblem> userProblemCollection)
 {
     using (var userProblemRepository = new UserProblemRepository())
     {
         return(await userProblemRepository.CreateAsync(userProblemCollection));
     }
 }
예제 #3
0
 public static async Task <UserProblem> CreateAsync(UserProblem userProblem)
 {
     using (var userProblemRepository = new UserProblemRepository())
     {
         return(await userProblemRepository.CreateAsync(userProblem));
     }
 }
예제 #4
0
        public static async Task <bool> DeleteAsync(Guid id)
        {
            using (var userProblemRepository = new UserProblemRepository())
            {
                var userProblemToDelete = await userProblemRepository.GetAsync(id);

                return(await userProblemRepository.DeleteAsync(userProblemToDelete));
            }
        }
예제 #5
0
        public static async Task <IList <UserProblem> > GetForDistrictProblemAsync(Guid problemId, Guid districtId)
        {
            if (problemId == Guid.Empty || districtId == Guid.Empty)
            {
                return(null);
            }

            using (var userProblemRepository = new UserProblemRepository())
            {
                return(await userProblemRepository.GetForDistrictProblemAsync(problemId, districtId));
            }
        }