Esempio n. 1
0
        public async Task <BookingRecord> FindAsync(Guid id)
        {
            ConditionalValue <Models.BookingRecord> result;

            var dictionary = await stateManager.GetAllBookingsAsync();

            using (var transaction = stateManager.CreateTransaction())
            {
                result = await dictionary.TryGetValueAsync(transaction, id);

                await transaction.CommitAsync();
            }

            return(result.HasValue ? result.Value.ToDomainModel() : null);
        }