예제 #1
0
        public IResponse GetValidationCondition(int validationConditionID)
        {
            GuardianOptions      options      = GuardianOptionsFactory.GetOptions();
            GuardianDataProvider dataProvider = options.GuardianDataProviderFactory();

            return(new JsonResponse(dataProvider.GetValidationCondition(validationConditionID)));
        }
예제 #2
0
        public IResponse DeleteValidationCondition(int validationConditionID)
        {
            GuardianOptions      options      = GuardianOptionsFactory.GetOptions();
            GuardianDataProvider dataProvider = options.GuardianDataProviderFactory();

            dataProvider.DeleteValidationCondition(validationConditionID);
            return(new JsonResponse(string.Empty));
        }
예제 #3
0
        public IResponse UpdateValidationCondition(ValidationCondition validationCondition)
        {
            GuardianOptions      options      = GuardianOptionsFactory.GetOptions();
            GuardianDataProvider dataProvider = options.GuardianDataProviderFactory();

            IValidationCondition createdValidation = dataProvider.UpdateValidationCondition(validationCondition);

            return(new JsonResponse(dataProvider.GetValidationCondition(createdValidation.ValidationConditionID)));
        }
예제 #4
0
 public void TestInitialize()
 {
     _dataProvider = GuardianDataProviderConfiguration.GetDataProvider();
     _dataProvider.BeginTransaction();
 }