Class DmlServiceBase
- Namespace
- LinqToDB.Internal.DataProvider
- Assembly
- linq2db.dll
Base class for provider-specific IDmlService implementations. Only providers whose DROP TABLE cannot express "if exists" at the SQL level register one — for every other provider the service is absent and suppression is not attempted.
public abstract class DmlServiceBase : IDmlService
- Inheritance
-
objectDmlServiceBase
- Implements
- Derived
- Extension Methods
Methods
HResultMatches(Exception, int)
True if exception's HResult matches
hResult, or the remote-transport message wrapper contains the
canonical hex form ("0x1234ABCD").
protected static bool HResultMatches(Exception exception, int hResult)
Parameters
Returns
IsTableNotFoundException(Exception)
Returns true if the given exception indicates the target table does not exist.
Used by DropTable to decide whether a "not exists" suppression request should
swallow a given error.
public bool IsTableNotFoundException(Exception exception)
Parameters
exceptionException
Returns
IsTableNotFoundExceptionCore(Exception)
Detects a provider-specific "table not found" exception. Called for every link of the inner-exception chain.
protected abstract bool IsTableNotFoundExceptionCore(Exception exception)
Parameters
exceptionException
Returns
TypeOrMessageContains(Exception, string)
Matches marker against the exception's type name or its message.
The message check is needed for remote (gRPC / HTTP) data contexts where the original
provider exception is wrapped — the type name survives only as text inside the
wrapping exception's Message (populated via ToString()).
protected static bool TypeOrMessageContains(Exception exception, string marker)