I have faced this problem in one of my project.
I have to create WebMethod that will get some data from CRM 2011 and return that to the client.
My code is return generic types in WebMethods but I couldn't use non-generic IEnumerable as well.
So I have to change this IEnumerable to Array as below.
Older Code which is not working I have to create WebMethod that will get some data from CRM 2011 and return that to the client.
My code is return generic types in WebMethods but I couldn't use non-generic IEnumerable as well.
So I have to change this IEnumerable to Array as below.
[WebMethod] public ListWorking code is belowReadEntityList() { List lstCRMEntity = new List (); //Write code here return lstCRMEntity; }
[WebMethod] public CRMEntity[] ReadEntityList() { ListHappy Coding...!!!lstCRMEntity = new List (); //Write code here return lstCRMEntity.ToArray(); }
very nice! Thanks.
ReplyDelete