public async Task <ActionResult <ProductCategory> > PostProductCategory(ProductCategory productCategory) { _context.ProductCategories.Add(productCategory); await _context.SaveChangesAsync(); return(CreatedAtAction("GetProductCategory", new { id = productCategory.Id }, productCategory)); }
public async Task <ActionResult <Product> > PostProduct(Product product) { _context.Products.Add(product); await _context.SaveChangesAsync(); return(CreatedAtAction("GetProduct", new { id = product.Id }, product)); }
public async Task <ActionResult <YD> > Post(YD yd) { _context.YD.Add(yd); await _context.SaveChangesAsync(); return(CreatedAtAction("Get", new { id = yd.Id }, yd)); }
public async Task <ActionResult <Table> > Post(Table table) { _context.Tables.Add(table); await _context.SaveChangesAsync(); return(CreatedAtAction("Get", new { id = table.Id }, table)); }
public async Task <ActionResult <Room> > Post(Room room) { _context.Rooms.Add(room); await _context.SaveChangesAsync(); return(CreatedAtAction("Get", new { id = room.Id }, room)); }