6

I'm trying to create a fulltext catalog on a entity framework migration but if I do a migration with:

migrationBuilder.Sql("CREATE FULLTEXT CATALOG[CatalogName]");

I get the following:

CREATE FULLTEXT CATALOG statement cannot be used inside a user transaction.

If I try to do it at the seed function I get the same result. I've searched about this and all issues I found the author either decided to do it manually on the DB or some other solution that is not applicable to me.

Any ideas on how I may get this to work?

JamCon
  • 2,313
  • 2
  • 25
  • 34
RicardoSBA
  • 785
  • 1
  • 6
  • 18

1 Answers1

16

Now I feel dumb. I didn't notice that Sql() function has an optional parameter to suppress the transaction :\ Passing true ended up solving my problem.

RicardoSBA
  • 785
  • 1
  • 6
  • 18