auto-mapper mapping array of objects to properties of object

auto-mapper mapping array of objects to properties of object

Hey guys,

am strugling with automapper in which

there is an api,

am consuming it using restapi,

any way, am serializing the body of the request of this api

also serialzing the response of this api,

the problem is , in the response there is an array of objects in which

i want to map it to some of the proprties of the request body,

https://i.redd.it/7qnqgkmhkab31.png

this is my code :-

i want to map desitnation object :-

class ResObj { public Billrec[] billRec { get; set; } } public class Billrec { public string billingAcct { get; set; } public Extrabillingacct[] extraBillingAccts { get; set; } public int billTypeCode { get; set; } public Billinfo billInfo { get; set; } } 

To Source Object class ReqObj { public string msgCode { get; set; } public string sender { get; set; } public string receiver { get; set; } public string custLang { get; set; } public DateTime clientDt { get; set; } public string rqUID { get; set; } public string asyncRqUID { get; set; } public string terminalId { get; set; } public string billingAcct { get; set; } public string bankId { get; set; } public int billTypeCode { get; set; } public string deliveryMethod { get; set; } } 

please help any thing would be apperciated thanks in advance :)))

submitted by /u/cw4i
[link] [comments]

Leave a Reply