Example #1
0
        public async Task <IActionResult> Create([Bind("AuId,AuLname,AuFname,Phone,Address,City,State,Zip,Contract")] Authors authors)
        {
            if (ModelState.IsValid)
            {
                _context.Add(authors);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(authors));
        }
Example #2
0
 public void Insert(Boek item)
 {
     _context.Add(item);
     _context.SaveChanges();
 }