ShamanOptions object is necessary for many Shaman operations. It contains plugins collection called ‘Services’. You can control many aspects of model processing by including specific services.
ShamanOptions.Default static property provides default configuration suitable for simple models. The value is calculated as new ShamanOptions().WithDefaultServices() .
Custom option object can be directly put in many methods like below
1 |
builder.FixOnModelCreating(this, myShamanOptions); |
Other solution is to create GetShamanOptions static method in DbContext class. Method must not have parameters and must return ShamanOptions object.
1 2 3 4 5 6 |
public static ShamanOptions GetShamanOptions() { return ShamanOptions.Default .WithSqlServer() .With<MySpecificService>(); } |