コード例 #1
0
        public async Task <PatientItem> CreateAPatientInformation(CloudTable table, String invocationName, Patient patient)
        {
            var patientInformation = new Patient(patient);
            var query       = new PatientItem(patient);
            var operation   = TableOperation.InsertOrMerge(query);
            var tableResult = await table.ExecuteAsync(operation);

            return((PatientItem)tableResult.Result);
        }
コード例 #2
0
        public async Task <PatientItem> DeleteAPatientInformation(CloudTable table, String invocationName, Patient patient)
        {
            var patientInformation = new Patient(patient);
            var query      = new PatientItem(patient);
            var operation  = TableOperation.Retrieve <PatientItem>(query.PartitionKey, query.RowKey);
            var readResult = table.ExecuteAsync(operation).GetAwaiter().GetResult().Result as PatientItem;

            operation = TableOperation.Delete(readResult);
            var deleteResult = await table.ExecuteAsync(operation);

            return((PatientItem)deleteResult.Result);
        }