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());
        }
Example #2
0
 public void UpdateProductType(ProductType ProductType)
 {
     using (var context = new ACContext())
     {
         context.Entry(ProductType).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
 public void DeleteProductSpecMapp(ProductSpecMapp productSpecMapp)
 {
     using (var context = new ACContext())
     {
         context.Entry(productSpecMapp).State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Example #4
0
 public void UpdateBrand(Brand brand)
 {
     using (var context = new ACContext())
     {
         context.Entry(brand).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
 public void DeleteCategory(Category category)
 {
     using (var context = new ACContext())
     {
         context.Entry(category).State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }