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)); }
public void Add(T entity) { _context.Add(entity); }