public async Task <int> UpdateInventoryItem(InventoryDbModel inventoryItem)
        {
            var query = $"UPDATE Inventory " +
                        $"SET " +
                        $"BatchNumber = '{inventoryItem.BatchNumber}'," +
                        $"LotNumber = '{inventoryItem.LotNumber}'," +
                        $"ExpiryDate = '{inventoryItem.ExpiryDate.ToString("yyyy-MM-dd")}'," +
                        $"ManufacturingDate = '{inventoryItem.ManufacturingDate.ToString("yyyy-MM-dd")}'," +
                        $"Quantity = {inventoryItem.Quantity} " +
                        $"WHERE InventoryId = {inventoryItem.InventoryId}";

            return(await SqliteDataAccess.ExecuteNonQueryAsync(_connectionString, query));
        }
        public async Task <int> AddInventoryItem(InventoryDbModel inventoryItem)
        {
            var isInventoryItemExists = (await GetInventoryItemsById(new List <int>()
            {
                inventoryItem.ItemId
            })).Any();

            if (isInventoryItemExists)
            {
                return(await UpdateInventoryItem(inventoryItem));
            }

            var query =
                $"INSERT INTO Inventory (ItemId, BatchNumber, LotNumber, ExpiryDate, ManufacturingDate, Quantity) " +
                $"VALUES ({inventoryItem.ItemId},'{inventoryItem.BatchNumber}','{inventoryItem.LotNumber}','{inventoryItem.ExpiryDate.ToString("yyyy-MM-dd")}','{inventoryItem.ManufacturingDate.ToString("yyyy-MM-dd")}', {inventoryItem.Quantity})";

            return(await SqliteDataAccess.ExecuteNonQueryAsync(_connectionString, query));
        }