Update Cache

This commit is contained in:
SUNKAIXUAN 2021-03-27 13:17:40 +08:00
parent 09f32ed7f9
commit fecffff14c
4 changed files with 9 additions and 1 deletions

View File

@ -954,6 +954,7 @@ namespace SqlSugar
public virtual DataTable ToDataTable()
{
QueryBuilder.ResultType = typeof(DataTable);
InitMapping();
var sqlObj = this.ToSql();
RestoreMapping();
@ -1324,6 +1325,7 @@ namespace SqlSugar
}
public async Task<DataTable> ToDataTableAsync()
{
QueryBuilder.ResultType = typeof(DataTable);
InitMapping();
var sqlObj = this.ToSql();
RestoreMapping();

View File

@ -48,6 +48,7 @@ namespace SqlSugar
public Type EntityType { get; set; }
public Type ResultType { get; set; }
public string TableWithString { get; set; }
public string GroupByValue { get; set; }
public string PartitionByValue { get; set; }

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
@ -13,6 +14,10 @@ namespace SqlSugar
result.Database = context.Context.Ado.Connection.Database;
AddTables(context, queryBuilder, result);
AddIdentificationList(queryBuilder, result);
if (queryBuilder.ResultType!=null)
{
result.IdentificationList.Add(queryBuilder.ResultType.FullName);
}
return result;
}

View File

@ -44,7 +44,7 @@ namespace SqlSugar
{
foreach (var item in keys)
{
if (item.ToLower().Contains(likeString))
if (item.ToLower().Contains(likeString.ToLower()))
{
cacheService.Remove<string>(item);
}