MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Shared Function GetPhotoBytes(ByVal source As IQueryable(Of Portfolio), ByVal size As PhotoSize) As Stream Dim imageBytes As Byte() Select Case size Case PhotoSize.Large imageBytes = source.Select(Function(p) p.BeforePicBytesFull).SingleOrDefault Case PhotoSize.Original imageBytes = source.Select(Function(p) p.BytesOriginal).SingleOrDefault Case PhotoSize.Small imageBytes = source.Select(Function(p) p.BytesThumb).SingleOrDefault Case Else imageBytes = source.Select(Function(p) p.BytesPoster).SingleOrDefault End Select If imageBytes IsNot Nothing Then Return New MemoryStream(imageBytes) Else Return New MemoryStream() End If End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.