抽象实体基类

This commit is contained in:
chenchun
2022-04-08 18:23:37 +08:00
parent 4472e4aa6f
commit 5b6ab486d7
5 changed files with 64 additions and 13 deletions

View File

@@ -6,11 +6,12 @@ using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Common.Models;
using Yi.Framework.Model.Models;
using Yi.Framework.Model.Query;
namespace Yi.Framework.Repository
{
public interface IRepository<T> : ISimpleClient<T> where T : class, new()
public interface IRepository<T> : ISimpleClient<T> where T : BaseModelEntity,new()
{
public Task<T> InsertReturnEntityAsync(T entity);
public Task<List<S>> StoreAsync<S>(string storeName, object para);

View File

@@ -2,6 +2,7 @@
using System.Data;
using System.Linq.Expressions;
using Yi.Framework.Common.Models;
using Yi.Framework.Model.Models;
using Yi.Framework.Model.Query;
/***这里面写的代码不会给覆盖,如果要重新生成请删除 Repository.cs ***/
@@ -11,7 +12,7 @@ namespace Yi.Framework.Repository
/// 仓储模式
/// </summary>
/// <typeparam name="T"></typeparam>
public class Repository<T> : DataContext<T>, IRepository<T> where T : class, new()
public class Repository<T> : DataContext<T>, IRepository<T> where T : BaseModelEntity,new()
{
/// <summary>