public async Task AddOrders(IEnumerable <Orders> orders)
 {
     foreach (var order in orders)
     {
         _context.Orders.Add(order);
         if (_context.Orders.Any(o => o.OxId.Equals(order.OxId)))
         {
             throw new Exception("The order with the same id is exist in db");                    //
         }
     }
     await _context.SaveChangesAsync();
 }
 public Task SaveOrder(OrderEntity order)
 {
     _context.Orders.AddAsync(order);
     return(_context.SaveChangesAsync());
 }
 public Task SaveItem(ItemEntity item)
 {
     _context.Items.AddAsync(item);
     return(_context.SaveChangesAsync());
 }