コード例 #1
0
 public ComponentInComputerService(IAppUnitOfWork unitOfWork) : base(unitOfWork,
                                                                     new BaseBLLMapper <DAL.App.DTO.ComponentInComputerFull, ComponentInComputerFull>(),
                                                                     unitOfWork.ComponentInComputers)
 {
     _mapper                 = new ComponentInComputerMapper();
     _componentService       = new ComponentService(unitOfWork);
     _compatibilityService   = new CompatibilityService(unitOfWork);
     _compatibilityCheckList = new Dictionary <string, List <string> >()
     {
         {
             "Motherboard", new List <string>
             {
                 "CPU", "PSU", "Case", "RAM", "GPU", "Storage"
             }
         },
         {
             "CPU", new List <string>
             {
                 "PSU", "Motherboard"
             }
         },
         {
             "Case", new List <string>
             {
                 "Motherboard", "PSU", "GPU"
             }
         },
         {
             "RAM", new List <string>
             {
                 "Motherboard"
             }
         },
         {
             "Storage", new List <string>
             {
                 "Motherboard"
             }
         },
         {
             "PSU", new List <string>
             {
                 "CPU", "Case", "GPU"
             }
         },
         {
             "GPU", new List <string>
             {
                 "PSU", "Case", "Motherboard"
             }
         }
     };
     _specCheckList = new Dictionary <string, List <string> >()
     {
         {
             "Motherboard,CPU", new List <string>
             {
                 "cpu-socket"
             }
         },
         {
             "CPU,Motherboard", new List <string>
             {
                 "cpu-socket"
             }
         }
     };
 }
コード例 #2
0
 public ComponentInComputerRepository(AppDbContext dbContext) : base(dbContext,
                                                                     new BaseDALMapper <ComponentInComputer, ComponentInComputerFull>())
 {
     _mapper = new ComponentInComputerMapper();
 }
コード例 #3
0
 public ComputerMapper()
 {
     _componentInComputerMapper = new ComponentInComputerMapper();
 }