public async Task <IActionResult> Create([Bind("Id,Name")] Department department)
        {
            if (ModelState.IsValid)
            {
                _context.Add(department);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(department));
        }
예제 #2
0
 public async Task InsertAsync(Saller obj)
 {
     _context.Add(obj);
     await _context.SaveChangesAsync();
 }
예제 #3
0
 public void Insert(Seller obj)
 {
     _context.Add(obj);
     _context.SaveChanges();
 }