BLL.ActiveImagingTask.DeleteActiveImagingTask C# (CSharp) Method

DeleteActiveImagingTask() public static method

public static DeleteActiveImagingTask ( int activeImagingTaskId ) : bool
activeImagingTaskId int
return bool
        public static bool DeleteActiveImagingTask(int activeImagingTaskId)
        {
            using (var uow = new DAL.UnitOfWork())
            {
                var activeImagingTask = uow.ActiveImagingTaskRepository.GetById(activeImagingTaskId);
                var computer = uow.ComputerRepository.GetById(activeImagingTask.ComputerId);

                uow.ActiveImagingTaskRepository.Delete(activeImagingTask.Id);
                if (uow.Save())
                {
                    new BLL.Workflows.CleanTaskBootFiles(computer).CleanPxeBoot();
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }