DataAccessFactory.cs 599 B

12345678910111213141516171819202122
  1. using FocasCncCollect.Models;
  2. using FocasCncCollect.TMS.Models;
  3. namespace FocasCncCollect.Core
  4. {
  5. public class DataAccessFactory
  6. {
  7. public static fmsforycContext GetInstance(bool lazyLoading = true)
  8. {
  9. var db = new fmsforycContext();
  10. db.Configuration.LazyLoadingEnabled = lazyLoading;
  11. return db;
  12. }
  13. public static tmsfrmContext GetTMSInstance(bool lazyLoading = true)
  14. {
  15. var db = new tmsfrmContext();
  16. db.Configuration.LazyLoadingEnabled = lazyLoading;
  17. return db;
  18. }
  19. }
  20. }