protected override void Send(TrackingRecord record)
        {
            var activityTrackingRecord = record as ActivityTrackingRecord;

            if (activityTrackingRecord == null)
                return;

            var type = GetWorkflowType(_parameters.WorkflowType);
            if (type.StatesToIgnoreInTracking.Count(s => s.Equals(activityTrackingRecord.QualifiedName,StringComparison.InvariantCultureIgnoreCase)) > 0)
                return;

            using (var context = new Budget2DataContext(ConfigurationManager.ConnectionStrings["default"].ConnectionString))
            {
                WorkflowTrackingHistory item = new WorkflowTrackingHistory()
                                                   {
                                                       Id = Guid.NewGuid(),
                                                       TransitionTime = DateTime.Now,
                                                       StateName = activityTrackingRecord.QualifiedName,
                                                       WorkflowId = _parameters.InstanceId,
                                                       WorkflowTypeId = type.Id

                                                   };
                context.WorkflowTrackingHistories.InsertOnSubmit(item);

                context.SubmitChanges();
            }
        }
 partial void DeleteWorkflowTrackingHistory(WorkflowTrackingHistory instance);
 partial void InsertWorkflowTrackingHistory(WorkflowTrackingHistory instance);
 partial void UpdateWorkflowTrackingHistory(WorkflowTrackingHistory instance);
		private void detach_WorkflowTrackingHistories(WorkflowTrackingHistory entity)
		{
			this.SendPropertyChanging();
			entity.WorkflowType = null;
		}