コード例 #1
0
        public async Task <ActionResult <ProductCategory> > PostProductCategory(ProductCategory productCategory)
        {
            _context.ProductCategories.Add(productCategory);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetProductCategory", new { id = productCategory.Id }, productCategory));
        }
コード例 #2
0
ファイル: Products.cs プロジェクト: lamboktulus1379/yd
        public async Task <ActionResult <Product> > PostProduct(Product product)
        {
            _context.Products.Add(product);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetProduct", new { id = product.Id }, product));
        }
コード例 #3
0
ファイル: YDsController.cs プロジェクト: lamboktulus1379/yd
        public async Task <ActionResult <YD> > Post(YD yd)
        {
            _context.YD.Add(yd);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Get", new { id = yd.Id }, yd));
        }
コード例 #4
0
        public async Task <ActionResult <Table> > Post(Table table)
        {
            _context.Tables.Add(table);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Get", new { id = table.Id }, table));
        }
コード例 #5
0
        public async Task <ActionResult <Room> > Post(Room room)
        {
            _context.Rooms.Add(room);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Get", new { id = room.Id }, room));
        }