Ejemplo n.º 1
0
        // GET
        public IActionResult Index()
        {
            //this throw parameterless construct
            var dto = new SampleClassDto()
            {
                Id          = 1,
                Name        = "test",
                ComplexType = new ComplexType()
                {
                    Id = 9999
                }
            };

            var sampleClass = Mapper.Map <SampleClass>(dto);

            return(Ok(sampleClass));
        }
        public IActionResult Index()
        {
            //this throw parameterless construct
            var dto = new SampleClassDto()
            {
                Id          = 1,
                Name        = "test",
                ComplexType = new ComplexType()
                {
                    Id = 9999
                }
            };

            var sampleClass = Mapper.Map <SampleClass>(dto);

            return(Ok(new { makeSureHostRegistered = _hosting, sampleClass }));
        }