Example #1
0
        static void Main(string[] args)
        {
            var personItem = new PersonItem {  Age = 25, FullName="Breakthen"};

            var person = Mapper.Map<PersonItem, Person>(personItem);

            Console.WriteLine("Person age: {0}, name: {1}.", person.Age, person.Name);
            Console.WriteLine("=========================+++++++============================");

            //IDataReader
            //IDataRecord

            TestDataReaderMapper();
            Console.WriteLine("=========================+++++++============================");

            //DataRow
            TestDataRowMapper();
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            var personItem = new PersonItem {
                Age = 25, FullName = "Breakthen"
            };

            var person = Mapper.Map <PersonItem, Person>(personItem);

            Console.WriteLine("Person age: {0}, name: {1}.", person.Age, person.Name);
            Console.WriteLine("=========================+++++++============================");

            //IDataReader
            //IDataRecord

            TestDataReaderMapper();
            Console.WriteLine("=========================+++++++============================");

            //DataRow
            TestDataRowMapper();
            Console.ReadKey();
        }