예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,Name")] Departament departament)
        {
            if (ModelState.IsValid)
            {
                _context.Add(departament);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(departament));
        }
예제 #2
0
 public async Task InsertAsync(Saller obj)
 {
     _context.Add(obj);
     await _context.SaveChangesAsync();
 }