mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update Cache
This commit is contained in:
parent
09f32ed7f9
commit
fecffff14c
@ -954,6 +954,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public virtual DataTable ToDataTable()
|
public virtual DataTable ToDataTable()
|
||||||
{
|
{
|
||||||
|
QueryBuilder.ResultType = typeof(DataTable);
|
||||||
InitMapping();
|
InitMapping();
|
||||||
var sqlObj = this.ToSql();
|
var sqlObj = this.ToSql();
|
||||||
RestoreMapping();
|
RestoreMapping();
|
||||||
@ -1324,6 +1325,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public async Task<DataTable> ToDataTableAsync()
|
public async Task<DataTable> ToDataTableAsync()
|
||||||
{
|
{
|
||||||
|
QueryBuilder.ResultType = typeof(DataTable);
|
||||||
InitMapping();
|
InitMapping();
|
||||||
var sqlObj = this.ToSql();
|
var sqlObj = this.ToSql();
|
||||||
RestoreMapping();
|
RestoreMapping();
|
||||||
|
@ -48,6 +48,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
|
|
||||||
public Type EntityType { get; set; }
|
public Type EntityType { get; set; }
|
||||||
|
public Type ResultType { get; set; }
|
||||||
public string TableWithString { get; set; }
|
public string TableWithString { get; set; }
|
||||||
public string GroupByValue { get; set; }
|
public string GroupByValue { get; set; }
|
||||||
public string PartitionByValue { get; set; }
|
public string PartitionByValue { get; set; }
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@ -13,6 +14,10 @@ namespace SqlSugar
|
|||||||
result.Database = context.Context.Ado.Connection.Database;
|
result.Database = context.Context.Ado.Connection.Database;
|
||||||
AddTables(context, queryBuilder, result);
|
AddTables(context, queryBuilder, result);
|
||||||
AddIdentificationList(queryBuilder, result);
|
AddIdentificationList(queryBuilder, result);
|
||||||
|
if (queryBuilder.ResultType!=null)
|
||||||
|
{
|
||||||
|
result.IdentificationList.Add(queryBuilder.ResultType.FullName);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
foreach (var item in keys)
|
foreach (var item in keys)
|
||||||
{
|
{
|
||||||
if (item.ToLower().Contains(likeString))
|
if (item.ToLower().Contains(likeString.ToLower()))
|
||||||
{
|
{
|
||||||
cacheService.Remove<string>(item);
|
cacheService.Remove<string>(item);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user