private static void DuplexSample(List <string> l) { //"INSERT INTO UneseneVrednosti " + //"(IDGeoPodrucja, VremeMerenja, Vrednost) " + //"VALUES ('" + idGeoPodrucja + "', '" + datum + "', " + _unesenaPotrosnja + ")"; var binding = new NetTcpBinding(); var address = new EndpointAddress("net.tcp://localhost:10102/IInsert"); var clientCallback = new UpisiCallback1(); var context = new InstanceContext(clientCallback); var factory = new DuplexChannelFactory <IInsert>(clientCallback, binding, address); IInsert messageChanel = factory.CreateChannel(); //foreach (var item in l) //{ Task.Run(() => messageChanel.InsertInto(l)); // } }