Esempio n. 1
0
        public async Task <IActionResult> PutClient(string id, Client client)
        {
            if (id != client.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Esempio n. 2
0
 public Task AddAsync(Title title)
 {
     context.Titles.Add(title);
     return(context.SaveChangesAsync());
 }
Esempio n. 3
0
 public Task AddAsync(Custom custom)
 {
     _context.Customs.AddAsync(custom);
     return(_context.SaveChangesAsync());
 }
Esempio n. 4
0
 public Task AddAsync(Department department)
 {
     _context.Departments.Add(department);
     return(_context.SaveChangesAsync());
 }
Esempio n. 5
0
 public Task AddAsync(Order_detail order_Detail)
 {
     _context.Order_details.AddAsync(order_Detail);
     return(_context.SaveChangesAsync());
 }
 public Task AddAsync(Deliver deliver)
 {
     _context.Delivers.AddAsync(deliver);
     return(_context.SaveChangesAsync());
 }
Esempio n. 7
0
 public Task AddAsync(Order_master order_Master)
 {
     _context.Order_masters.AddAsync(order_Master);
     return(_context.SaveChangesAsync());
 }
Esempio n. 8
0
 public Task AddAsync(Supply supply)
 {
     _context.Supplies.AddAsync(supply);
     return(_context.SaveChangesAsync());
 }
 public Task AddAsync(Product_data product_Data)
 {
     _context.Product_datas.AddAsync(product_Data);
     return(_context.SaveChangesAsync());
 }
Esempio n. 10
0
 public Task AddAsync(Product_item product_Item)
 {
     _context.Product_items.AddAsync(product_Item);
     return(_context.SaveChangesAsync());
 }
 public Task AddAsync(Employee employee)
 {
     _context.Employees.Add(employee);
     return(_context.SaveChangesAsync());
 }