It doesn't have to be difficult (e.g. getdate() default
), you just have to know where to inject...
You can include a custom SQL into the 'chain' - via using Seed
-ing
or custom Initializer
- to do any kind of custom work.
You may have problems with migrations, if you want to do that 'post-creation' - but if you limit all such similar init work while the Db is still empty you should be ok.
Another thing to worry about is various Db providers - as any custom SQL may vary, or support - but if you know what you're targeting you should be ok.
Check this link - Possible to default DateTime field to GETDATE() with Entity Framework Migrations?
Or this one generally about Triggers https://stackoverflow.com/a/5913581/417747
...it might be close to what you need - and get you ideas about how to do some other things.