public async Task <T> GetEntityAsync(string keyValue, string connectionString = null) { using (SystemContext context = DataBaseConfig.CreateContext(connectionString)) { return(await context.FindAsync <T>(keyValue)); } }
public async Task <bool> DeleteAsync(string[] keyValues, string connectionString = null) { using (SystemContext context = DataBaseConfig.CreateContext(connectionString)) { List <T> entitys = new List <T>(); entitys.ForEach(async u => { entitys.Add(await context.FindAsync <T>(u)); }); return(await DeleteAsync(entitys)); } }