public async Task <Models.WebChat> CreateAsync(Models.WebChat webChat) { if (webChat == null) { return(null); } webChat.SetDefaultValues(); var documentDbProvider = new DocumentDBProvider(); var response = await documentDbProvider.CreateWebChatAsync(webChat); return(response.StatusCode == HttpStatusCode.Created ? (dynamic)response.Resource : null); }