I understand that you cannot return a generic list in a standard .asmx webservice. However I believe you can return an array []. My problem is converting the list to an array. Can someone help? I have a bunch of Business Object that already return a type List so I am not open to converting the original objects to Arrays...
Here is my WebMethod.
[WebMethod]
public Book[] GetBooksList()
{
List<Book> obj = new List<Book>();
BookDA dataAccess = new BookDA();
obj = dataAccess.GetBooksAll().ToArray(); //error 1 here on conversion
return obj; //error 2 here
}
Error I receive is 2 fold : Cannot implicitly convert type BookDTO.Book [] to GenericList
Cannot implicitly convert type GenericList to