Пример #1
0
        public async Task <IActionResult> Create([Bind("Id,Nome,Vertical,Link,Historico")] Fornecedor fornecedor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(fornecedor);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(fornecedor));
        }
Пример #2
0
 public async Task <int> SaveChanges()
 {
     return(await Db.SaveChangesAsync());
 }