You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.