RingSoft.DbLookup.Controls.WPF.Properties Namespace
RingSoft.DbMaintenance Namespace

ExtensionMethods..::..DeleteEntity<(Of <(<'TEntity>)>)> Method

Deletes the entity and commits the changes. Outputs all errors to the DbDataProcessor SqlErrorViewer.

Namespace:  RingSoft.DbLookup.EfCore
Assembly:  RingSoft.DbLookup.EfCore (in RingSoft.DbLookup.EfCore.dll)

Syntax


public static bool DeleteEntity<TEntity>(
	this DbContext dbContext,
	DbSet<TEntity> dbSet,
	TEntity entity,
	string debugMessage,
	bool silent
)
<ExtensionAttribute> _
Public Shared Function DeleteEntity(Of TEntity) ( _
	dbContext As DbContext, _
	dbSet As DbSet(Of TEntity), _
	entity As TEntity, _
	debugMessage As String, _
	silent As Boolean _
) As Boolean
[ExtensionAttribute]
public:
generic<typename TEntity>
static bool^ DeleteEntity(
	DbContext^ dbContext, 
	DbSet<TEntity>^ dbSet, 
	TEntity entity, 
	String^ debugMessage, 
	bool^ silent
)

Type Parameters

TEntity
The type of the entity.

Parameters

dbContext
Type: DbContext
The database context.
dbSet
Type: DbSet<(Of <(<'TEntity>)>)>
The database set.
entity
Type: TEntity
The entity.
debugMessage
Type: String
The debug message.
silent
Type: Boolean
if set to true [silent].

Return Value

true if XXXX, false otherwise.