Add virtual

This commit is contained in:
sunkaixuan
2022-03-31 08:55:05 +08:00
parent 0efbc0e5d8
commit ec2f475904

View File

@@ -102,7 +102,7 @@ namespace SqlSugar
{ {
return Context.Queryable<T>().Single(whereExpression); return Context.Queryable<T>().Single(whereExpression);
} }
public T GetFirst(Expression<Func<T, bool>> whereExpression) public virtual T GetFirst(Expression<Func<T, bool>> whereExpression)
{ {
return Context.Queryable<T>().First(whereExpression); return Context.Queryable<T>().First(whereExpression);
} }
@@ -232,7 +232,7 @@ namespace SqlSugar
{ {
return Context.Queryable<T>().SingleAsync(whereExpression); return Context.Queryable<T>().SingleAsync(whereExpression);
} }
public Task<T> GetFirstAsync(Expression<Func<T, bool>> whereExpression) public virtual Task<T> GetFirstAsync(Expression<Func<T, bool>> whereExpression)
{ {
return Context.Queryable<T>().FirstAsync(whereExpression); return Context.Queryable<T>().FirstAsync(whereExpression);
} }