忱 沈 4 years ago
parent
commit
1d09ebe4f4
  1. 42
      Models/IProvider.cs
  2. 1
      Models/Models.csproj

42
Models/IProvider.cs

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models
{
/// <summary>
/// 查询接口
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IProvider<T>where T: class
{
/// <summary>
/// 查询一条记录
/// </summary>
/// <returns></returns>
List<T> Select();
/// <summary>
/// 插入一条记录
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
int Insert(T t);
/// <summary>
/// 修改一条记录
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
int Update(T t);
/// <summary>
/// 删除一条记录
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
int Delete(T t);
}
}

1
Models/Models.csproj

@ -152,6 +152,7 @@
<Compile Include="EventList.cs"> <Compile Include="EventList.cs">
<DependentUpon>SQL_BD.tt</DependentUpon> <DependentUpon>SQL_BD.tt</DependentUpon>
</Compile> </Compile>
<Compile Include="IProvider.cs" />
<Compile Include="JOBTKT.cs"> <Compile Include="JOBTKT.cs">
<DependentUpon>SQL_Ti.tt</DependentUpon> <DependentUpon>SQL_Ti.tt</DependentUpon>
</Compile> </Compile>

Loading…
Cancel
Save