Yep, bait fruit flies with cider vinegar or red or white wine with a drop of washing up liquid in it, they're deeply attracted to it but they sink and drown when they break the surface. Rinse all bottles and cans immediately after use, and get rid of old fruit, then clean your kitchen. The problem will be gone in 24 hours.
Midges biting you is a different matter. Fly spray the room, leave it for ten minutes and it should have rid the room of them.