public void ValidationRulesErrorMessage_Destroy(ValidationRulesErrorMessageViewModel validationRulesErrorMessage) { var entity = new ValidationRulesErrorMessages(); entity.Id = validationRulesErrorMessage.Id; parameters.ValidationRulesErrorMessages.Attach(entity); parameters.ValidationRulesErrorMessages.Remove(entity); parameters.SaveChanges(); }
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; }
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(); }