Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("Id,Name,Email,Remarks")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
Ejemplo n.º 2
0
        public async Task AddRange(IList <Follow> follows)
        {
            await _context.Follow.AddRangeAsync(follows);

            await _context.SaveChangesAsync();
        }