using HiTeachCC.Service.Core.Interface; using Microsoft.WindowsAzure.Storage.Table; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using TEAMModelOS.SDK.Helper.Common.CollectionHelper; using TEAMModelOS.SDK.Module.AzureTable.Implements; namespace HiTeachCC.Service.Core.Implement { public class BaseService : AzureTableDBRepository, IBaseService { public async Task> FindListByDictHasAll(Dictionary dict) where T : TableEntity, new() { if (dict.Count <= 0) { return await FindAll(); } else { return await FindListByDict(dict); } } public async Task DeleteAll(Dictionary dict) where T : TableEntity, new() { List list = await FindListByDict(dict); if (list.IsNotEmpty()) { list = await DeleteAll(list); return list.Count; } else { return 0; } } } }