/*
Name:IDataBase
Author: Terry Dong
Description: interface for data access
*/
using System;
using System.Data;
using System.Collections.Generic;
using TerryDong.SystemFramework;
namespace TerryDong.DAL
{
    public interface IDataBase<T>
    {

        /// <summary>
        /// get max ID
        /// </summary>
        int GetMaxId();

        /// <summary>
        /// if exists data
        /// </summary>
        bool Exists(string primaryKeyId);

        /// <summary>
        /// add new entity
        /// </summary>
        void Add(T t);

        /// <summary>
        /// update entity
        /// </summary>
        void Update(T t);

        /// <summary>
        /// delete data by primarykeyid
        /// </summary>
        void Delete(int primaryKeyId);

        /// <summary>
        /// get entity data
        /// </summary>
        T GetEntity(int primaryKeyId);

        /// <summary>
        /// get dataset data
        /// </summary>
        DataSet GetDataSet(string strWhere);

        /// <summary>
        /// get dataset data default is all.
        /// </summary>
        DataSet GetDataSet();

        /// <summary>
        /// get entity list by input condition
        /// </summary>
        SortList<T> GetList(string strWhere);

    }
}

相关文章:

  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-10-10
  • 2021-07-12
猜你喜欢
  • 2021-11-01
  • 2021-11-11
  • 2022-12-23
  • 2021-08-03
  • 2021-10-15
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案