public static SessionDetails GetSession(
            [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "sessions/{id}")]
            HttpRequestMessage req,
            [DocumentDB("conferencesdemo", "sessionsx", Id = "{id}", ConnectionStringSetting = "ConferencesDb")]
            SessionDetails session,
            TraceWriter log)
        {
            log.Info("GetSession function processed a request: " + session.Id);

            return(session);
        }
        public static async Task <HttpResponseMessage> AddSession(
            [HttpTrigger(AuthorizationLevel.Anonymous, "POST", Route = "sessions")]
            SessionDetails session,
            [DocumentDB("conferencesdemo", "sessionsx", Id = "Id", ConnectionStringSetting = "ConferencesDb")]
            IAsyncCollector <SessionDetails> documents,
            TraceWriter log)
        {
            log.Info("AddSession function processed a request: " + session.Id);

            await documents.AddAsync(session);

            return(await Task.FromResult(new HttpResponseMessage(HttpStatusCode.Created)));
        }