Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            DocumentoEntity documentoEntity = await _context.Documento.FindAsync(id);

            _context.Documento.Remove(documentoEntity);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 2
0
 private DocumentoViewModel ToDocumenViewModel(DocumentoEntity documento)
 {
     return(new DocumentoViewModel
     {
         Id = documento.Id,
         Name = documento.Name,
         Document = documento.Document,
         FirstName = documento.FirstName,
         Email = documento.Email,
         pdfUrl = documento.pdfUrl,
         UploadDate = documento.UploadDate,
         User = documento.User
     });
 }
Ejemplo n.º 3
0
        // GET: DocumentoEntities/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            DocumentoEntity documentoEntity = await _context.Documento
                                              .FirstOrDefaultAsync(m => m.Id == id);

            if (documentoEntity == null)
            {
                return(NotFound());
            }

            return(View(documentoEntity));
        }
Ejemplo n.º 4
0
 public void Update(DocumentoEntity t)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 public int Insert(DocumentoEntity t)
 {
     throw new NotImplementedException();
 }