I am creating class to be the structure that will always return all services (called asynchronous)
public class AnswerService {
public bool IsSuccess {get; set; }
public string Error {get; set; }
public int Code {get; set; }
public string Exception {get; set; }
public Object Result {get; set; }
}
It is assumed that the result should be the data that before I returned the function (List, string, bool, Object etc)
When I call the service and the result variable is a List for example gives this error
Error generating XML document. ---> The System.Collections.Generic.List` type can not be used in this context.
Try with an array and neither, I do not know if you can do this in this asmx schema because I know that internally there is a mapping of the service q does .net when generating the proxy in the client and object is generic.
How could I solve this or what alternative could I use to return both the data and the object of error?
NOTE: In the client when calling service it shut down in another method that uses async and await, reason why it can not use parameters by reference
Aucun commentaire:
Enregistrer un commentaire