private OrderSeats Find(Guid id)
        {
            var dto = storage.Find(GetSeatAssignmentsBlobId(id));

            if (dto == null)
            {
                return(null);
            }

            using (var stream = new MemoryStream(dto)) {
                using (var reader = new StreamReader(stream)) {
                    return((OrderSeats)serializer.Deserialize(reader));
                }
            }
        }
Example #2
0
        private T FindBlob <T>(string id)
            where T : class
        {
            var dto = blobStorage.Find(id);

            if (dto == null)
            {
                return(null);
            }

            using (var stream = new MemoryStream(dto)) {
                using (var reader = new StreamReader(stream, Encoding.UTF8)) {
                    return((T)serializer.Deserialize(reader));
                }
            }
        }