public IAssembler <XmlGenericEntityDTO, GenericEntity <int> > CreateXmlAssembler() { Configuration cfg = new Configuration(); cfg.AddAssemblyReference(Assembly.GetAssembly(typeof(GenericsMappingTests))); cfg.AddAssemblyResources(Assembly.GetAssembly(typeof(XmlGenericEntityDTO)), "otis.xml"); return(cfg.GetAssembler <XmlGenericEntityDTO, GenericEntity <int> >()); }
public IAssembler <AttributedGenericEntityDTO, GenericEntity <int> > CreateAttributedAssembler() { Configuration cfg = new Configuration(); cfg.AddType(typeof(AttributedGenericEntityDTO)); // the following 2 lines are there to init Nullable transformation cfg.AddAssemblyReference(Assembly.GetAssembly(typeof(GenericsMappingTests))); cfg.AddAssemblyResources(Assembly.GetAssembly(typeof(XmlGenericEntityDTO)), "otis.xml"); return(cfg.GetAssembler <AttributedGenericEntityDTO, GenericEntity <int> >()); }