public async Task put(int id, DocumentDeliveryRequest request)
        {
            var upload = new UploadFiles();
            var model  = await _repository.GetByIdAsync(id);

            model.Delivery = await _delivery.GetByIdAsync(request.DeliveryId);

            model.Format = request.Format;
            model.Name   = request.Name;

            upload.Delete(model.Path);

            model.Path    = upload.Upload(request.Name, request.Format, request.Doc);
            model.Student = await _student.GetByEmail(request.Student);

            await _repository.Put(model);
        }
        public async Task <DocumentDelivery> post(DocumentDeliveryRequest request)
        {
            var upload = new UploadFiles();

            DocumentDelivery model = new DocumentDelivery();

            model.Delivery = await _delivery.GetByIdAsync(request.DeliveryId);

            model.Format  = request.Format;
            model.Name    = request.Name;
            model.Path    = upload.Upload(request.Name, request.Format, request.Doc);
            model.Student = await _student.GetByEmail(request.Student);

            var newModel = await _repository.PostAsync(model);

            return(_repository.Find(x => x.Id == newModel.Id, x => x.Delivery, x => x.Student));
        }