Beispiel #1
0
        public async Task <Models.Transfer> CreateAsync(Models.Transfer transfer)
        {
            if (transfer == null)
            {
                return(null);
            }

            transfer.SetDefaultValues();

            var documentDbProvider = new DocumentDBProvider();

            var response = await documentDbProvider.CreateTransferAsync(transfer);

            return(response.StatusCode == HttpStatusCode.Created ? (dynamic)response.Resource : null);
        }