Class DatabaseModelRecordDataExtensions
Extension methods to make it easy to fetch DatabaseModelRecordData objects from the database,
using the TargetedSelect infrastructure
Inheritance
DatabaseModelRecordDataExtensions
Assembly: SoDataBase.dll
Syntax
public static class DatabaseModelRecordDataExtensions
Methods
FromRecord(TargetedDataRecord<DatabaseModelTableInfo>)
Declaration
public static DatabaseModelRecordData FromRecord(this TargetedDataRecord<DatabaseModelTableInfo> record)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
/* add joins, return fields etc. as you wish */
s.ReturnFields.Add(s.Table.All);
var result = s.Records().Select(r => new { DatabaseModelItem = r.FromRecord(), /* fetch other fields here */ });
FromSelect(TargetedSelect<DatabaseModelTableInfo>)
From a TargetedSelect<DatabaseModelTableInfo>, execute it and return an IEnumerable<DatabaseModelRecordData> with the results
Declaration
public static IEnumerable<DatabaseModelRecordData> FromSelect(this TargetedSelect<DatabaseModelTableInfo> select)
Parameters
Returns
Examples
var s = S.NewSelect<DataRightTableInfo>( /* add meaningful restrictions here, or later */ );
var result = s.FromSelect();
ToInsert(DatabaseModelRecordData)
Extension methods to make it easy to fetch DatabaseModelRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static Insert ToInsert(this DatabaseModelRecordData record)
Parameters
Returns
ToInserts(IEnumerable<DatabaseModelRecordData>)
Extension methods to make it easy to fetch DatabaseModelRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static IEnumerable<Insert> ToInserts(this IEnumerable<DatabaseModelRecordData> records)
Parameters
Returns
ToRecordData(DatabaseModelRow)
Extension methods to make it easy to fetch DatabaseModelRecordData objects from the database,
using the TargetedSelect infrastructure
Declaration
public static DatabaseModelRecordData ToRecordData(this DatabaseModelRow row)
Parameters
Returns