Esempio n. 1
0
        public async Task <IActionResult> Create([Bind("Id,Name,Data,Status")] Machines machines)
        {
            if (ModelState.IsValid)
            {
                machines.Id = Guid.NewGuid();
                _context.Add(machines);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(machines));
        }
Esempio n. 2
0
 public void Add(T entity)
 {
     _context.Add(entity);
 }