Exemple #1
0
        public async Task <bool> DeleteActiveBoolAsync <T>(T entity) where T : class
        {
            bool @bool = false;
            InterfaceRepoDeleteActiveBoolAsync repoWrapperAsync = new RepoWrapperAsync(new MirrorDBContext());
            var resultRepo = await repoWrapperAsync.DeleteActiveBoolAsync <T>(entity);

            if (resultRepo.IsSuccessConnection & resultRepo.IsSuccessQuery)
            {
                @bool = true;
            }
            return(@bool);
        }
Exemple #2
0
        public async Task <IActionResult> DeleteAsync <T>(DeleteById delete) where T : class, IDeleteProperties
        {
            T kelas = Activator.CreateInstance <T>();

            kelas.ID         = delete.DeletedId;
            kelas.UpdateById = delete.UpdateById;

            var hasil = await repo.DeleteActiveBoolAsync <T>(kelas);

            bool isSaved = repo.ConvertReturnValueToBool(hasil);

            jsonResult = compress.CompressedData(isSaved);
            return(Ok(jsonResult));
        }
Exemple #3
0
        public async Task <bool> DeleteActiveBoolAsync <T1, T2, T3>(int IDIdentity1, int IDIdentity2, int IDIdentity3)
            where T1 : class
            where T2 : class
            where T3 : class
        {
            bool @bool = false;
            InterfaceRepoDeleteActiveBoolAsync repoWrapperAsync = new RepoWrapperAsync(new MirrorDBContext());
            var resultRepo = await repoWrapperAsync.DeleteActiveBoolAsync <T1, T2, T3>(IDIdentity1, IDIdentity2, IDIdentity3);

            if (resultRepo.IsSuccessConnection & resultRepo.IsSuccessQuery)
            {
                @bool = true;
            }
            return(@bool);
        }
Exemple #4
0
        public async Task <bool> DeleteActiveBoolAsync <T1, T2, T3, T4, T5>(T1 entity1, T2 entity2, T3 entity3, T4 entity4, T5 entity5)
            where T1 : class
            where T2 : class
            where T3 : class
            where T4 : class
            where T5 : class
        {
            bool @bool = false;
            InterfaceRepoDeleteActiveBoolAsync repoWrapperAsync = new RepoWrapperAsync(new MirrorDBContext());
            var resultRepo = await repoWrapperAsync.DeleteActiveBoolAsync <T1, T2, T3, T4, T5>(entity1, entity2, entity3, entity4, entity5);

            if (resultRepo.IsSuccessConnection & resultRepo.IsSuccessQuery)
            {
                @bool = true;
            }
            return(@bool);
        }