AsyncBehaviorManager.cs 654 B

12345678910111213141516171819202122232425
  1. using DbCommon.BusinessCore.DbCore;
  2. using DbCommon.Enties.DbModels;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace DbCommon.BusinessCore.BaseCore
  9. {
  10. public class AsyncBehaviorManager : DbContext<AsyncBehaviorModel>
  11. {
  12. public void Init()
  13. {
  14. //If no exist create datebase
  15. //Db.DbMaintenance.CreateDatabase();
  16. if (!Db.DbMaintenance.IsAnyTable("AsyncBehavior", false))
  17. {
  18. //Create tables
  19. Db.CodeFirst.InitTables(typeof(AsyncBehaviorModel));
  20. }
  21. }
  22. }
  23. }