mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
v3.2.806-preview20231214
This commit is contained in:
@ -57,13 +57,23 @@ namespace FreeSql
|
||||
}
|
||||
}
|
||||
public void AsType(Type entityType) => _repository.AsType(entityType);
|
||||
Func<string, string> _asTableRule;
|
||||
Func<Type, string, string> _asTableRule;
|
||||
public void AsTable(Func<string, string> rule)
|
||||
{
|
||||
_repository.AsTable(rule);
|
||||
_asTableRule = rule;
|
||||
if (rule == null)
|
||||
{
|
||||
_asTableRule = null;
|
||||
return;
|
||||
}
|
||||
_asTableRule = (t, old) => t == EntityType ? rule(old) : null;
|
||||
}
|
||||
public Type EntityType => _repository.EntityType;
|
||||
public void AsTable(Func<Type, string, string> rule)
|
||||
{
|
||||
_repository.AsTable(rule);
|
||||
_asTableRule = rule;
|
||||
}
|
||||
public Type EntityType => _repository.EntityType;
|
||||
public IDataFilter<TEntity> DataFilter => _repository.DataFilter;
|
||||
|
||||
public void Attach(TEntity entity)
|
||||
|
Reference in New Issue
Block a user