public void UpdateScheduledFilterTask(ScheduledFilterTaskDto scheduledFilterTask)
 {
     using (var context = RepositoryContext.Create())
     {
         var filtertask = scheduledFilterTask.ProjectedAs<ScheduledFilterTask>();
         var repository = context.GetRepository<ScheduledFilterTaskRepository>();
         repository.UpdateFilterTask(filtertask);
         context.UnitOfWork.Commit();
     }
 }
 private ScheduledFilterTask ConvertNew(ScheduledFilterTaskDto scheduledFilterTask, int userId)
 {
     var idgenerator = ContainerHelper.Instance.Resolve<IIdentityGenerator>();
     var filtertask = scheduledFilterTask.ProjectedAs<ScheduledFilterTask>();
     var conditionid = idgenerator.NewGuid().ToString();
     var expression = new FilterExpression(conditionid, filtertask.Condition.Expression.ExpressionString, null);
     expression.UpdateFrom(filtertask.Condition.Expression);
     return new ScheduledFilterTask(idgenerator.NewGuid().ToString(), filtertask.Schedule)
         {
             Name = filtertask.Name,
             Condition = new FilterCondition(conditionid, userId, expression)
                 {
                     Name = filtertask.Condition.Name,
                     Description = filtertask.Condition.Description,
                     CutoffTime = filtertask.Condition.CutoffTime
                 }
         };
 }