Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoapResponseDtoMapper

.Net framework class library that takes XML response and maps it to DTO.

Getting Started

All you have to do is clone or download the solution. It's just one class library which can be referenced in your project.

Example

This is how you use the mapper in your code:

// use reflection to get list of properties to map to object
var listOfProperties = typeof(DtoResponseObject).GetProperties().Select(expr => expr.Name);

// map xml data to DTO
var result = _xmlToDomainObject.MapXmlStringToObject<DtoResponseObject>(listOfProperties, xmlResponse);

You can also work with collections

// use reflection to get list of properties to map to object
var listOfProperties= typeof(DtoResponseObject).GetProperties().Select(expr => expr.Name);

// map xml data to DTO
var result =
    _xmlToDomainObject.MapXmlStringToListObject<List<DtoResponseObject>, DtoResponseObject>(listOfProperties, soapResponse);

Authors

Contact me

If you want to contact me either send me a message on LinkedIn or to my email address: nickgowdy87@gmail.com

About

This is a .net framework class library for working with soap responses. I originally wrote this so I could retrieve data from a legacy SOAP service and take the string returned and map the XML values to a domain object.

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages