private void Setup(string approach) { DatabaseTesting.ResetDatabase(); Context context = new Context(); switch (approach) { case "Code": CopyDa_Code copDa_Code = new CopyDa_Code(); LoaningDa_Code loaningDaCode = new LoaningDa_Code(); CopyDm_Code copyDm_Code = new CopyDm_Code(copDa_Code, loaningDaCode, context); _copyService = new CopyService(copyDm_Code); break; case "Database": CopyDa_Database copyDa_Database = new CopyDa_Database(context); LoaningDa_Database loaningDaDatabase = new LoaningDa_Database(context); CopyDm_Database copyDm_Database = new CopyDm_Database(copyDa_Database, loaningDaDatabase); _copyService = new CopyService(copyDm_Database); break; default: new NotImplementedException(); break; } }
private void Setup(string approach) { DatabaseTesting.ResetDatabase(); Context context = new Context(); switch (approach) { case "Code": MaterialDa_Code materialDa_Code = new MaterialDa_Code(); LibraryDa_Code libraryDa_Code = new LibraryDa_Code(); LibrarianDa_Code librarianDaCode = new LibrarianDa_Code(); CopyDa_Code copyDa_Code = new CopyDa_Code(); LoaningDa_Code loaningDaCode = new LoaningDa_Code(); MaterialDm_Code materialsDm_Code = new MaterialDm_Code(materialDa_Code, libraryDa_Code, librarianDaCode, copyDa_Code, loaningDaCode, context); _materialService = new MaterialService(materialsDm_Code); break; case "Database": MaterialsDa_Database materialDa_Db = new MaterialsDa_Database(context); MaterialsDm_Database materialsDm_Db = new MaterialsDm_Database(materialDa_Db); _materialService = new MaterialService(materialsDm_Db); break; default: new NotImplementedException(); break; } }
public MaterialDm_Code(MaterialDa_Code materialDa, LibraryDa_Code libraryDa, LibrarianDa_Code librarianDa, CopyDa_Code copyDa, LoaningDa_Code loaningDa, Context context) { _materialDa = materialDa; _libraryDa = libraryDa; _librarianDa = librarianDa; _copyDa = copyDa; _loaningDa = loaningDa; _context = context; }
public CopyDm_Code(CopyDa_Code copyDa, LoaningDa_Code loaningDa, Context context) { _copyDa = copyDa; _loaningDa = loaningDa; _context = context; }