samedi 24 février 2018

Here i am using auto mapper in my controller, but the source object shows null value , why?

enter image description here

 if (!ModelState.IsValid)
            return BadRequest();


        var o = Mapper.Map<OrderDto,Order>(ordr);

        _context.Orders.Add(o);
        _context.SaveChanges();

why Object "O" is null?




Aucun commentaire:

Enregistrer un commentaire