mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-24 19:52:51 +08:00

- 修复 IInsert/IUpdate.NoneParameter() 设成了反作用的 bug; - 修复 IDbFirst.GetTablesByDatabase() 默认数据库 bool 判断 bug; - 增加 FreeSql.Repository 之 IUnitOfWork 实现,[查看参数资料](https://github.com/2881099/FreeSql/wiki/%e5%b7%a5%e4%bd%9c%e5%8d%95%e5%85%83); - 增加 FreeSql.Repository 继承实现的仓储注入; ```csharp builder.RegisterFreeRepository( filter => filter.Apply<Song>("test", a => a.Title == DateTime.Now.ToString() + Thread.CurrentThread.ManagedThreadId), this.GetType().Assembly ); ```
21 lines
583 B
C#
21 lines
583 B
C#
using System;
|
|
using System.Linq.Expressions;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FreeSql {
|
|
|
|
public interface IRepository {
|
|
Type EntityType { get; }
|
|
}
|
|
|
|
public interface IRepository<TEntity> : IReadOnlyRepository<TEntity>, IBasicRepository<TEntity>
|
|
where TEntity : class {
|
|
int Delete(Expression<Func<TEntity, bool>> predicate);
|
|
|
|
Task<int> DeleteAsync(Expression<Func<TEntity, bool>> predicate);
|
|
}
|
|
|
|
public interface IRepository<TEntity, TKey> : IRepository<TEntity>, IReadOnlyRepository<TEntity, TKey>, IBasicRepository<TEntity, TKey>
|
|
where TEntity : class {
|
|
}
|
|
} |