v3.0.1
This commit is contained in:
橙子
2021-06-02 20:00:25 +08:00
parent 6ea91cbaf6
commit e5063e1a4d
57 changed files with 1665 additions and 359 deletions

View File

@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace CC.Yi.DAL
{
@@ -16,8 +17,15 @@ namespace CC.Yi.DAL
{
Db = _Db;
}
public async Task<T> GetEntityById(int id)
{
return await Db.Set<T>().FindAsync(id);
}
public IQueryable<T> GetEntities(Expression<Func<T, bool>> whereLambda)
{
return Db.Set<T>().Where(whereLambda).AsQueryable();
}

View File

@@ -14,11 +14,4 @@ namespace CC.Yi.DAL
Db = _Db;
}
}
public partial class propDal : BaseDal<prop>, IpropDal
{
public propDal(DataContext _Db):base(_Db)
{
Db = _Db;
}
}
}