Hi Guys,
I am using LLBLGen Views in an MVC application and i need to return an IEnumerable object. My code looks like this:
Dim objExternalMailItemGroup As New TypedViewClasses.VwGetExternalMailItemTypedView
Dim filter As IPredicateExpression = New PredicateExpression()
filter.Add(New FieldCompareValuePredicate(VwGetExternalMailItemFields.StartDate, ComparisonOperator.LessEqual, StartDate))
filter.AddWithAnd(New FieldCompareValuePredicate(VwGetExternalMailItemFields.EndDate, ComparisonOperator.GreaterEqual, EndDate))
filter.AddWithOr(New FieldCompareNullPredicate(VwGetExternalMailItemFields.EndDate))
objExternalMailItemGroup.Fill(0, Nothing, True, filter)
Return AutoMapper.Mapper.Map(Of ExternalMailItemGroup)(objExternalMailItemGroup)
I was wondering if it's possible to return an IEnumerable object? whenever i try the following line, it does not work
Return AutoMapper.Mapper.Map(Of IEnumerable(of ExternalMailItemGroup))(objExternalMailItemGroup)