Created
April 27, 2013 04:11
-
-
Save DevJohnC/5471856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| namespace FragLabs.Adjutant.API.Interfaces | |
| { | |
| /// <summary> | |
| /// Data access provider. | |
| /// </summary> | |
| public interface IDataProvider | |
| { | |
| bool TableExists<T>() where T : new(); | |
| bool TableExists(Type tableType); | |
| void DropAndCreateTables(params Type[] tableTypes); | |
| void CreateTables(bool overwrite, params Type[] tableTypes); | |
| void CreateTable<T>() where T : new(); | |
| void CreateTable<T>(bool overwrite) where T : new(); | |
| void CreateTable(bool overwrite, Type tableType); | |
| void CreateTableIfNotExists<T>() where T : new(); | |
| void CreateTableIfNotExists(Type t); | |
| void DropTable<T>() where T : new(); | |
| void DropTable(Type tableType); | |
| void DropTables(params Type[] tableTypes); | |
| void Delete<T>(params T[] objs) where T : new(); | |
| void DeleteAll<T>(IEnumerable<T> objs) where T : new(); | |
| void DeleteById<T>(object id) where T : new(); | |
| void DeleteByIds<T>(IEnumerable idValues) where T : new(); | |
| void DeleteAll<T>() where T : new(); | |
| void DeleteAll(Type modelType); | |
| void Delete<T>(string sqlFilter, params object[] filterParams) where T : new(); | |
| void Delete(Type modelType, string sqlFilter, params object[] filterParams); | |
| void Insert<T>(params T[] models) where T : new(); | |
| void Insert(Type type, object model); | |
| void InsertAll<T>(IEnumerable<T> objs) where T : new(); | |
| void Update<T>(params T[] objs) where T : new(); | |
| void UpdateAll<T>(IEnumerable<T> objs) where T : new(); | |
| void Save<T>(T obj) where T : new(); | |
| void Save<T>(params T[] objs) where T : new(); | |
| void SaveAll<T>(IEnumerable<T> objs) where T : new(); | |
| List<T> Select<T>() where T : new(); | |
| List<T> Select<T>(string sqlFilter, params object[] filterParams) where T : new(); | |
| List<T> Select<T>(Type fromTableType) where T : new(); | |
| List<T> Select<T>(Type fromTableType, string sqlFilter, params object[] filterParams) where T : new(); | |
| T First<T>(string filter, params object[] filterParams) where T : new(); | |
| T First<T>(string filter) where T : new(); | |
| T FirstOrDefault<T>(string filter, params object[] filterParams) where T : new(); | |
| T FirstOrDefault<T>(string filter) where T : new(); | |
| T GetById<T>(object idValue) where T : new(); | |
| T SingleWhere<T>(string name, object value) where T : new(); | |
| T QuerySingle<T>(object anonType) where T : new(); | |
| T QuerySingle<T>(string sql, object anonType) where T : new(); | |
| List<T> Where<T>(string name, object value) where T : new(); | |
| List<T> Where<T>(object anonType) where T : new(); | |
| List<T> Query<T>(string sql, object anonType) where T : new(); | |
| List<T> Query<T>(string sql, Dictionary<string, object> dict = null) where T : new(); | |
| T QueryScalar<T>(object anonType); | |
| T QueryScalar<T>(string sql, object anonType = null); | |
| List<T> ByExampleWhere<T>(object anonType) where T : new(); | |
| List<T> QueryByExample<T>(string sql, object anonType = null) where T : new(); | |
| IEnumerable<T> QueryEach<T>(string sql, object anonType = null) where T : new(); | |
| IEnumerable<T> EachWhere<T>(object anonType) where T : new(); | |
| T GetByIdOrDefault<T>(object idValue) where T : new(); | |
| List<T> GetByIds<T>(IEnumerable idValues) where T : new(); | |
| T GetScalar<T>(string sql, params object[] sqlParams) where T : new(); | |
| long GetLastInsertId(); | |
| List<T> GetFirstColumn<T>(string sql, params object[] sqlParams) where T : new(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment