Example #1
0
        public static OAuthSettingsDataCollection Where(WhereDelegate <OAuthSettingsDataColumns> where, OrderBy <OAuthSettingsDataColumns> orderBy = null, Database database = null)
        {
            database = database ?? Db.For <OAuthSettingsData>();
            var results = new OAuthSettingsDataCollection(database, database.GetQuery <OAuthSettingsDataColumns, OAuthSettingsData>(where, orderBy), true);

            return(results);
        }
Example #2
0
        /// <summary>
        /// Return every record in the OAuthSettingsData table.
        /// </summary>
        /// <param name="database">
        /// The database to load from or null
        /// </param>
        public static OAuthSettingsDataCollection LoadAll(Database database = null)
        {
            SqlStringBuilder sql = new SqlStringBuilder();

            sql.Select <OAuthSettingsData>();
            Database db      = database ?? Db.For <OAuthSettingsData>();
            var      results = new OAuthSettingsDataCollection(sql.GetDataTable(db));

            results.Database = db;
            return(results);
        }
Example #3
0
        private static OAuthSettingsData OneOrThrow(OAuthSettingsDataCollection c)
        {
            if (c.Count == 1)
            {
                return(c[0]);
            }
            else if (c.Count > 1)
            {
                throw new MultipleEntriesFoundException();
            }

            return(null);
        }
Example #4
0
        /// <summary>
        /// This method is intended to respond to client side Qi queries.
        /// Use of this method from .Net should be avoided in favor of
        /// one of the methods that take a delegate of type
        /// WhereDelegate&lt;OAuthSettingsDataColumns&gt;.
        /// </summary>
        /// <param name="where"></param>
        /// <param name="database"></param>
        public static OAuthSettingsDataCollection Where(QiQuery where, Database database = null)
        {
            var results = new OAuthSettingsDataCollection(database, Select <OAuthSettingsDataColumns> .From <OAuthSettingsData>().Where(where, database));

            return(results);
        }