public async Task <IActionResult> PutMProductTypeStatic(int id, MProductTypeStatic mProductTypeStatic) { if (id != mProductTypeStatic.Id) { return(BadRequest()); } _context.Entry(mProductTypeStatic).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MProductTypeStaticExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <MProductTypeStatic> > PostMProductTypeStatic(MProductTypeStatic mProductTypeStatic) { _context.MProductTypeStatic.Add(mProductTypeStatic); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMProductTypeStatic", new { id = mProductTypeStatic.Id }, mProductTypeStatic)); }