Skip to content

BizArk.Data.Extensions.BaDatabaseExtractExt

Brian Brewder edited this page Nov 13, 2018 · 2 revisions

Back to BizArk.Data API Reference

Extension methods for BaDatabase to pull data out in either strongly-typed or dynamic objects.

NOTE: There are Async versions of these methods.

Methods

  • public static T GetObject<T>(this BaDatabase db, DbCommand cmd, Func<IDataReader, T> load = null) - Instantiates the object and sets properties based on the field name. Only returns the first row.
  • public static IEnumerable<T> GetObjects<T>(this BaDatabase db, DbCommand cmd, Func<DbDataReader, T> load = null) - Instantiates the object and sets properties based on the field name. Only returns the first row.
  • public static dynamic GetDynamic(this BaDatabase db, DbCommand cmd) - Gets the first row as a dynamic object.
  • public static IEnumerable<dynamic> GetDynamics(this BaDatabase db, DbCommand cmd) - Returns the results of the SQL command as a list of dynamic objects.

Clone this wiki locally