public TestMasterMappingValidator(ITestMasterMappingRepositry testMasterMappingRepositry)
 {
     //RuleFor(x => x.PartMasterID).Must(validatePartAndMaster).WithMessage("Please select part!");
     //RuleFor(x => x.LocationMasterID).Must(validatePartAndMaster).WithMessage("Please select location!");
     RuleFor(x => x.LocationMasterID).Must((o, t) => { return
                                                       (testMasterMappingRepositry.IfExistsPartAndLocationCombination(o.LocationMasterID, o.PartMasterID, o.TestMasterID)); })
     .WithMessage("combination of part and location exists");
 }
 public TestMasterMappingService(ITestMasterMappingRepositry testMasterMappingRepositry, IUnitOfWork unitOfWork, IMapper _iMpper)
 {
     this.testMasterMappingRepositry = testMasterMappingRepositry;
     this.unitOfWork = unitOfWork;
     this._iMpper    = _iMpper;
 }
 public TestMasterMappingService(ITestMasterMappingRepositry testMasterMappingRepositry, IUnitOfWork unitOfWork, IValidatorFactory validatorFactory)
 {
     this.validatorFactory           = validatorFactory;
     this.testMasterMappingRepositry = testMasterMappingRepositry;
     this.unitOfWork = unitOfWork;
 }