public void SetChannel2Group(string baseUrl, int districtServerId, IEnumerable <Channel2Group> c2gs, int appId, string endpointUrl, string sessionId) { string connectionStr = _dbConnectionService.GetConnection(baseUrl); foreach (Channel2Group c2g in c2gs) { _databaseProvider.Excute(connectionStr, "[dbo].[cma_c2g.set]", new { server_id = c2g.channelId, group_id = c2g.groupId }, CommandType.StoredProcedure); } _databaseProvider.Excute(connectionStr, "[dbo].[cma_extended.set]", new { district_server_id = districtServerId, app_id = appId, endpoint_url = endpointUrl, session_id = sessionId }, CommandType.StoredProcedure); }