/// <summary> /// Adds new wireless sensor network to account /// </summary> /// <param name="Network">model of the newtork to be created</param> /// <returns>unique identifier for created network</returns> public async Task <long> CreateNetwork(CreateNetwork Network) { //Create a nework using the notifEye DB var network = await _networkClient.CreateNetwork(Network.Name); //prepare the networklocation model. var netLocation = _mapper.Map <NetworkLocation>(Network); netLocation.CSNetID = network.NetworkID; //create a Networklocation in DB await _networkLocationClient.CreateNetworkLocation(netLocation); return(network.NetworkID); }