Used AutoMapper.dll... worked like a charm!
How to subclass a class in Web Reference? (class is in reference.cs)
-
27-06-2022 - |
Question
I am building a .dll from a webservice to look like so:
namespace MyDllFromWebService
{
public class AnimalDll_2013
{
public AnimalApi.Animal UpdateAnimal(Animal animal)
{
return new AnimalApi().UpdateAnimal(credentials, animal)
}
public AnimalApi.Animal GetAnimal(int id)
{
return new AnimalApi().GetAnimal(credentials, id)
}
}
//I WOULD LIKE FOR THIS TO BE USED
public class Animal
{
}
}
I am running into issues with the Animal class. I want to be able to use an Animal class in my main namespace (not AnimalApi.Animal).
How do I go about making this happen? (I tried inheriting but i have xml errors "not excepted)
Please point me in the right direction as to how to use XmlInclude properly or something.
Ideally, i would like to leave Reference.cs as is but if i need to change it, i can (I would like to do it from my main class). Thanks.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow