Ejemplo n.º 1
0
        public async Task <IActionResult> PutTurnipIsland(long id, TurnipIsland turnipIsland)
        {
            if (id != turnipIsland.Id)
            {
                return(BadRequest());
            }

            _context.Entry(turnipIsland).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TurnipIslandExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Ejemplo n.º 2
0
 public void UpdateProductType(ProductType ProductType)
 {
     using (var context = new ACContext())
     {
         context.Entry(ProductType).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void DeleteProductSpecMapp(ProductSpecMapp productSpecMapp)
 {
     using (var context = new ACContext())
     {
         context.Entry(productSpecMapp).State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public void UpdateBrand(Brand brand)
 {
     using (var context = new ACContext())
     {
         context.Entry(brand).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
Ejemplo n.º 5
0
 public void DeleteCategory(Category category)
 {
     using (var context = new ACContext())
     {
         context.Entry(category).State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }