예제 #1
0
        public void ValidationRulesErrorMessage_Destroy(ValidationRulesErrorMessageViewModel validationRulesErrorMessage)
        {
            var entity = new ValidationRulesErrorMessages();

            entity.Id = validationRulesErrorMessage.Id;

            parameters.ValidationRulesErrorMessages.Attach(entity);

            parameters.ValidationRulesErrorMessages.Remove(entity);

            parameters.SaveChanges();
        }
예제 #2
0
        public void ValidationRulesErrorMessage_Create(ValidationRulesErrorMessageViewModel validationRulesErrorMessage)
        {
            var entity = new ValidationRulesErrorMessages();

            entity.ColumnID = validationRulesErrorMessage.ColumnID;
            entity.Message  = validationRulesErrorMessage.Message;
            entity.ValidationFormTypeIds = validationRulesErrorMessage.ValidationFormTypeIds;

            parameters.ValidationRulesErrorMessages.Add(entity);
            parameters.SaveChanges();

            validationRulesErrorMessage.Id = entity.Id;
        }
예제 #3
0
        public void ValidationRulesErrorMessage_Update(ValidationRulesErrorMessageViewModel validationRulesErrorMessage)
        {
            var entity = new ValidationRulesErrorMessages();

            entity.Id       = validationRulesErrorMessage.Id;
            entity.ColumnID = validationRulesErrorMessage.ColumnID;
            entity.Message  = validationRulesErrorMessage.Message;
            entity.ValidationFormTypeIds = validationRulesErrorMessage.ValidationFormTypeIds;

            parameters.ValidationRulesErrorMessages.Attach(entity);
            parameters.Entry(entity).State = EntityState.Modified;
            parameters.SaveChanges();
        }