public void uploadTask(int taskID, int userID, Document uploadDoc)
        {
            var taskVersions = db.TaskVersions.Where(v => v.UserID == userID && v.TaskID == taskID);
            TaskVersion uploadTask = new TaskVersion()
            {
                Document = uploadDoc,
                RatingStatus = "Pending",
                TaskID = taskID,
                UserID = userID,
                Version = taskVersions.FirstOrDefault() != null ?
                taskVersions.Max(v => v.Version) + 1 : 1
            };
            uploadDoc.Blob = uploadTask.TaskID + "/" + uploadTask.Version;

            db.Documents.Add(uploadDoc);
            db.TaskVersions.Add(uploadTask);
            db.SaveChanges();
        }
 public TaskVersionDTO(TaskVersion Version)
 {
     this.VersID = Version.VersID;
     this.SeminarID = Version.Task.SeminarID;
 }