using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Repository.BaseRepository.Interface
{
public interface IBaseRepository
{
///
/// 新增table一筆資料
/// dictionary ex:{"@guid", Guid.NewGuid()}
///
/// 新增資料庫名稱以及值
/// 資料表名稱
///
///
Task AddOneByCustomTable(Dictionary dict, string Table_name);
///
/// 透過guid,軟刪除單一筆資料
/// UPDATE {tableName} SET deleted = 1 WHERE {idName} = @Guid
///
///
///
///
///
Task DeleteOne(string guid, string tableName, string idName);
///
/// 透過guid、db_name、table_name,刪除指定的資料庫之資料表的一筆資料
/// UPDATE {db_name}.{table_name} SET Deleted = 1 WHERE {idName} = @Guid
///
///
///
///
///
///
Task DeleteOneByGuidWithCustomDBNameAndTable(string guid, string db_name, string table_name, string idName);
///
/// 根據Where條件進行刪除
/// DELETE FROM {table_name} WHERE {sWhere}
///
///
///
///
Task PurgeOneByGuidWithCustomDBNameAndTable(string table_name, string sWhere);
///
/// 指定單一欄位,實際刪除單一筆資料
/// DELETE FROM {table_name} WHERE {idName} = @Guid
///
///
///
///
///
Task PurgeOneAsync(string guid, string table_name, string idName);
///
/// 取得所有資料(根據條件以及排序) 不需要則填where為""
/// SELECT * FROM {tableName} WHERE {sWhere}
///
///
///
///
/// Ex: new { status = 1}
///
///
Task> GetAllAsync(string tableName, string sWhere, object param = null, string sOrderBy = "");
///
/// 根據SQL語句抓取整包資料
///
///
///
/// Ex: new { status = 1}
///
Task> GetAllAsync(string sqlString, object param = null);
///
/// 取得單一筆資料(排序),不需OrderBy填""
/// SELECT * FROM {tableName} WHERE {sWhere} ORDER BY {sOrderBy}
///
///
///
///
///
///
///
Task GetOneAsync(string tableName, string sWhere, object param = null, string sOrderBy = "");
///
/// 取得單一筆資料某一欄位(排序),不需sWhere及sOrderBy填""
///
/// SELECT {selCol} FROM {tableName} WHERE {sWhere} ORDER BY {sOrderBy}
///
///
///
///
///
/// 填放欄位
///
Task