We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.825版本,sqllite 使用using创建IFreeSql 对象后,方法执行完毕之后,文件还是被占用,需要Dispose才行 public async Task<Tuple<long, List>> GetTablePageAsync(string fileName, string tableName, PageCondition pageCondition, Expression<Func<T1, bool>>? exp = null, Expression<Func<T1, object>>? orderBy = null, bool descending = false) where T1 : class, ISqliteEntity { string tableName2 = tableName; _sqliteService.RegisterDataSource(fileName); using IFreeSql freeSql = _freeSqlCloudService.Use(fileName); if (!freeSql.DbFirst.ExistsTable(tableName2)) { return Tuple.Create(0L, new List()); }
ISelect<T1> select = freeSql.Select<T1>().AsTable((Type type, string old) => tableName2).WhereIf(exp != null, exp); return Tuple.Create(await select.CountAsync(), await select.OrderByDescending(descending, orderBy).Page(pageCondition.PageIndex, pageCondition.PageSize).ToListAsync()); }
sqllite
The text was updated successfully, but these errors were encountered:
要释放文件才会释放。
Sorry, something went wrong.
如何释放呢,请教
FreeSql.Cloud 2.0.1
cloud.RemoveRegister(key, true);
感谢
No branches or pull requests
问题描述及重现代码:
3.2.825版本,sqllite 使用using创建IFreeSql 对象后,方法执行完毕之后,文件还是被占用,需要Dispose才行
public async Task<Tuple<long, List>> GetTablePageAsync(string fileName, string tableName, PageCondition pageCondition, Expression<Func<T1, bool>>? exp = null, Expression<Func<T1, object>>? orderBy = null, bool descending = false) where T1 : class, ISqliteEntity
{
string tableName2 = tableName;
_sqliteService.RegisterDataSource(fileName);
using IFreeSql freeSql = _freeSqlCloudService.Use(fileName);
if (!freeSql.DbFirst.ExistsTable(tableName2))
{
return Tuple.Create(0L, new List());
}
数据库版本
sqllite
3.2.825
.net framework/. net core 8.0
The text was updated successfully, but these errors were encountered: