Closed kjkrum closed 2 years ago
Laraue.EfCoreTriggers.Common 6.3.2 Laraue.EfCoreTriggers.SqlServer 6.3.2 Microsoft.EntityFrameworkCore.SqlServer 6.0.7 Microsoft.EntityFrameworkCore.Tools 6.0.7
I created a test trigger that does nothing:
builder.Entity<User>().AfterUpdate(trigger => { trigger.Action(action => { action.ExecuteRawSql("NULL"); }); });
Then I ran add-migration and got this error:
add-migration
Cannot scaffold C# literals of type Laraue.EfCoreTriggers.Common.TriggerBuilders.OnUpdate.OnUpdateTrigger`1[MyProject.Entities.User]'. The provider should implement CoreTypeMapping.GenerateCodeLiteral to support using it at design time.
Nevermind, I forgot to call UseSqlServerTriggers().
UseSqlServerTriggers()
Laraue.EfCoreTriggers.Common 6.3.2 Laraue.EfCoreTriggers.SqlServer 6.3.2 Microsoft.EntityFrameworkCore.SqlServer 6.0.7 Microsoft.EntityFrameworkCore.Tools 6.0.7
I created a test trigger that does nothing:
Then I ran
add-migration
and got this error: