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