protected U ExecuteSingle <U>(string command = null, object param = null) { U result = default(U); IDBProvider provider = new MSSQLDBProvider(); if (!string.IsNullOrEmpty(command)) { this.command = command; } using (var conn = provider.GetDBConnection()) { result = conn.Query <U>(this.command, param).SingleOrDefault(); } return(result); }
protected IQueryable <U> ExecuteQuery <U>(string command = null, object param = null) { IQueryable <U> result = null; IDBProvider provider = new MSSQLDBProvider(); if (!string.IsNullOrEmpty(command)) { this.command = command; } using (var conn = provider.GetDBConnection()) { result = conn.Query <U>(this.command, param).AsQueryable <U>(); } return(result); }