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