Esempio n. 1
0
        public async Task <IActionResult> Create([Bind("Id,Name")] DocumentType documentType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(documentType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(documentType));
        }
Esempio n. 2
0
        public async Task AddDocument(Document document)
        {
            await documentManagerContext.Documents.AddAsync(document);

            await documentManagerContext.SaveChangesAsync();
        }