public async Task <ActionResult <hardware> > Posthardware(hardware u) { _context.hardware.Add(u); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(Gethardware), new { id = u.Id }, u)); }
public async Task <IActionResult> Puthardware(long id, hardware item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
select(algorithm: a, hardware: h);
public void AddHardware(hardware a) { utwk.GetRepository <hardware>().Add(a); utwk.Commit(); }