public static void SetDialogueIfNeeded_AddsMappedIsFroozenToDictionary() { var target = new SqlDialectHelper(); target.SetDialogueIfNeeded <Brave>(SqlDialect.SqLite); var result = target.GetEntityState <Brave>(); Assert.That(result.HasValue, Is.True); Assert.That(OrmConfiguration.GetDefaultEntityMapping <Brave>().Dialect, Is.EqualTo(SqlDialect.SqLite)); }
protected void SetDialogueOnce <T>(IUnitOfWork uow) where T : class { _helper.SetDialogueIfNeeded <T>(uow.SqlDialect); }
public static int BulkDelete <TEntity>(this IUnitOfWork uow, Action <IConditionalBulkSqlStatementOptionsBuilder <TEntity> > statementOptions = null) where TEntity : class { DialogueHelper.SetDialogueIfNeeded <TEntity>(uow.SqlDialect); return(statementOptions != null? uow.Connection.BulkDelete(statementOptions) : uow.Connection.BulkDelete <TEntity>(statement => statement.AttachToTransaction(uow.Transaction))); }
public static int BulkDelete <TEntity>(this ISession connection, Action <IConditionalBulkSqlStatementOptionsBuilder <TEntity> > statementOptions = null) where TEntity : class { DialogueHelper.SetDialogueIfNeeded <TEntity>(connection.SqlDialect); return((connection as IDbConnection).BulkDelete(statementOptions)); }