Tools/LinqToSqlExtensions.cs
/// <summary>Returns a string representation the LINQ <see cref="IProvider"/> command text and parameters used that would be issued to delete a entity row via the supplied primary key.</summary>
/// <typeparam name="TEntity">Represents the object type for rows contained in <paramref name="table"/>.</typeparam>
/// <param name="table">Represents a table for a particular type in the underlying database containing rows are to be deleted.</param>
/// <typeparam name="TPrimaryKey">Represents the object type for the primary key of rows contained in <paramref name="table"/>.</typeparam>
/// <param name="primaryKey">Represents the primary key of the item to be removed from <paramref name="table"/>.</param>
/// <returns>Returns a string representation the LINQ <see cref="IProvider"/> command text and parameters used that would be issued to delete a entity row via the supplied primary key.</returns>
/// <remarks>This method is useful for debugging purposes or when used in other utilities such as LINQPad.</remarks>
Returns a string representation the LINQ  command text and parameters used that would be issued to delete a entity row via the supplied primary key.
Returns a string representation the LINQ command text and parameters used that would be issued to delete a entity row via the supplied primary key .
public static string DeleteByPKPreview<TEntity>( this Table<TEntity> table, object primaryKey ) where TEntity : class
		{
			DbCommand delete = table.GetDeleteByPKCommand<TEntity>( primaryKey );
			return delete.PreviewCommandText( false ) + table.Context.GetLog();
		}
public static string DeleteByPKPreview < TEntity > ( this Table < TEntity > table , object primaryKey ) where TEntity : class { DbCommand delete = table . GetDeleteByPKCommand < TEntity > ( primaryKey ) ; return delete . PreviewCommandText ( false ) + table . Context . GetLog ( ) ; }
Returns a string representation the LINQ  command text and parameters used that would be issued to delete a entity row via the supplied primary key.
Returns a string representation the LINQ command text and parameters used that would be issued to delete a entity row via the supplied primary key .
Returns a string representation the LINQ  command text and parameters used that would be issued to delete a entity row via the supplied primary key.
Returns a string representation the LINQ command text and parameters used that would be issued to delete a entity row via the supplied primary key .
Table<TEntity>
this
primaryKey
object
Represents the primary key of the item to be removed from .
Represents the primary key of the item to be removed from .
table
Represents a table for a particular type in the underlying database containing rows are to be deleted.
Represents a table for a particular type in the underlying database containing rows are to be deleted .
typeparam
Represents the object type for rows contained in .
Represents the object type for rows contained in .
typeparam
Represents the object type for the primary key of rows contained in .
Represents the object type for the primary key of rows contained in .
remarks
This method is useful for debugging purposes or when used in other utilities such as LINQPad.
This method is useful for debugging purposes or when used in other utilities such as LINQPad .