Beispiel #1
0
        public ActionResult Coba1()
        {
            var siswa2 = new Siswa2()
            {
                Name = "Joko",
                Age  = 24
            };
            Siswa1 siswa1 = GetMapper.Map <Siswa1>(siswa2);

            return(Ok());
        }
Beispiel #2
0
        public ActionResult Get()
        {
            var siswa1 = new Siswa1()
            {
                Id        = Guid.NewGuid(),
                Name      = "Joko",
                Age       = 24,
                CreatedAt = DateTime.Now,
                UpdatedAt = DateTime.Now
            };
            Siswa2 siswa2 = GetMapper.Map <Siswa2>(siswa1);

            return(Ok());
        }