public void UpdateTask(UpdateTaskInput input)
 {
     //We can use Logger, it's defined in ApplicationService class.
     Logger.Info("Updating a task for input: " + input);
     var task = _taskRepository.Get(input.Id);
     task.Title = input.Title;
     task.Description = input.Description;
     task.TaskState = input.TaskState;
     task.ModifyTime = DateTime.Now;
     task.ModifyUserID = input.ModifyUserID;
     task.BeginTime = input.BeginTime;
     task.EndTime = input.EndTime;
     task.TaskLevel = input.TaskLevel;
     task.TaskCategory = input.TaskCategory;
     task.RepeatMode = input.RepeatMode;
     task.Frequency = input.Frequency;
     task.RepeatDays = input.RepeatDays;
     task.RepeatType = input.RepeatType;
     task.RemindType = input.RemindType;
     task.RemindTime = input.RemindTime;
     task.ModifyUserID = input.ModifyUserID;
     if (input.AssignedPersonId.HasValue)
     {
         task.AssignedPerson = _personRepository.Load(input.AssignedPersonId.Value);
     }
 }
        public void UpdateTask(UpdateTaskInput input)
        {
            var task = _taskRepository.Get(input.TaskId);

            if (input.State.HasValue)
            {
                task.State = input.State.Value;
            }

            if (input.AssignedPersonId.HasValue)
            {
                task.AssignedPerson = _personRepository.Load(input.AssignedPersonId.Value);
            }
        }
        public void UpdateTask(UpdateTaskInput input)
        {
            Logger.Info("Updating a task for input: " + input);

            var task = _taskRepository.Get(input.TaskId);

            if (input.State.HasValue)
            {
                task.State = input.State.Value;
            }

            if (input.AssignedPersonId.HasValue)
            {
                task.AssignedPerson = _personRepository.Load(input.AssignedPersonId.Value);
            }
        }
        public void UpdateTask(UpdateTaskInput input)
        {
            //We can use Logger, it's defined in ApplicationService base class.
            Logger.Info("Updating a task for input: " + input);

            //Retrieving a task entity with given id using standard Get method of repositories.
            var task = _taskRepository.Get(input.TaskId);

            //Updating changed peoperties of the retrieved task entity.

            if (input.State.HasValue)
            {
                task.State = input.State.Value;
            }

            if (input.AssignedPersonId.HasValue)
            {
                task.AssignedPerson = _personRepository.Load(input.AssignedPersonId.Value);
            }

            //We even do not call Update method of the repository.
            //Because an application service method is a 'unit of work' scope as default.
            //ABP automatically saves all changes when a 'unit of work' scope ends (without any exception).
        }