This repository has been archived on 2020-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
dotnet-nhibernate-test/ConsoleApp1/Model/PersonMapTest.cs

23 lines
574 B
C#
Raw Normal View History

2020-06-08 22:12:01 +00:00
using System;
using System.Xml.Serialization;
using NHibernate.Mapping.ByCode;
using NUnit.Framework;
namespace ConsoleApp1.Model
{
[TestFixture]
public class PersonMapTest
{
[Test]
public void CanGenerateXmlMapping()
{
var mapper = new ModelMapper();
mapper.AddMapping<PersonMap>();
var mapping = mapper.CompileMappingForAllExplicitlyAddedEntities();
var xmlSerializer = new XmlSerializer(mapping.GetType());
xmlSerializer.Serialize(Console.Out, mapping);
}
}
}