예제 #1
0
        private static void GetPropertyFullInfo(RealEstatesDbContext context)
        {
            Console.WriteLine("Count:");
            int count = int.Parse(Console.ReadLine());
            IPropertiesService propertiesService = new PropertiesService(context);
            var properties = propertiesService.GetPropertyFullData(count);

            var serializee = new XmlSerializer(typeof(PropertyFullInfoDTO[]), new XmlRootAttribute("Properties"));

            var writer = new StringWriter();

            serializee.Serialize(writer, properties);

            Console.WriteLine(writer.ToString());

            writer.Close();
        }