コード例 #1
0
 /// <summary>
 /// Creates an instance of SQLinq that is based off the specified Object Type.
 /// </summary>
 /// <typeparam name="T">The Type to use for creating the SQLinq instance.</typeparam>
 /// <param name="obj">The Object Type to base the SQLinq instance off of.</param>
 /// <param name="tableName">Optional. The database table name to use for generated SQL code. If specified, this will override the Objects name and/or SQLinqTable attribute usage.</param>
 /// <returns>A SQLinq instance.</returns>
 public static SQLinq <T> ToSQLinq <T>(this T obj, string tableName = null, ISqlDialect dialect = null)
 {
     if (dialect == null)
     {
         dialect = DialectProvider.Create();
     }
     return(SQLinq.Create(obj, tableName, dialect));
 }
コード例 #2
0
 /// <summary>
 /// Creates an instance of SQLinq that is based off the specified Object Type.
 /// </summary>
 /// <typeparam name="T">The Type to use for creating the SQLinq instance.</typeparam>
 /// <param name="obj">The Object Type to base the SQLinq instance off of.</param>
 /// <param name="tableName">Optional. The database table name to use for generated SQL code. If specified, this will override the Objects name and/or SQLinqTable attribute usage.</param>
 /// <returns>A SQLinq instance.</returns>
 public static SQLinq <T> ToSQLinq <T>(this T obj, string tableName = null)
 {
     return(SQLinq.Create(obj, tableName));
 }