No Persister For Fluent Nhibernate Error
here for a quick overview of the site Help Center Detailed answers to any no persister for nhibernate c# questions you might have Meta Discuss the workings and policies of fluent nhibernate no persister for entity this site About Us Learn more about Stack Overflow the company Business Learn more about hiring no persister for nhibernate mapping by code developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up no persister for: Fluent nHibernate Exception up vote 3 down vote favorite i m getting the exception "No persister for: MVCTemplate.Common.Entities.User" . I Google this issue and apply all the solution i found. but all are useless for me. Does anyone know what i m doing wrong ? my User Class code is public class User { public virtual Guid UserID { get; private set; } public virtual string UserName { get; set; } public virtual string Password { get; set; } public virtual string FullName { get; set; } public virtual string Email { get; set; } public virtual TimeSpan LastLogin { get; set; } public virtual bool IsActive { get; set; } public virtual DateTime CreationDate { get; set; } public virtual IList
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join http://stackoverflow.com/questions/6606800/no-persister-for-fluent-nhibernate-exception them; it only takes a minute: Sign up Fluent NHibernate no persister for entitiy class up vote 0 down vote favorite I've Googled my ass off and can't seem to find the solution to my problem. I trying to get the demo project here: http://wiki.fluentnhibernate.org/Getting_started to work with sql-server 2008. I can't seem to create the sessionFactory correctly. The code: http://stackoverflow.com/questions/6663574/fluent-nhibernate-no-persister-for-entitiy-class private static ISessionFactory CreateSessionFactory() { try { return Fluently.Configure() .Database(MsSqlConfiguration.MsSql2008 .ConnectionString(c => c .Server("localhost") .Database("gisli") .TrustedConnection()).ShowSql()) .Mappings(m => { m.HbmMappings.AddFromAssemblyOf
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/3345743/need-help-with-a-no-persister-for-exception-with-fluent-nhibernate-automappin Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like no persister you, helping each other. Join them; it only takes a minute: Sign up Need help with a 'No persister for:' exception with Fluent Nhibernate Automapping up vote 3 down vote favorite I'm having some problems with applying NHibernate Fluent Automapping. It worked great in a test project. But now.. Test method [PROJECTNAME].SubscriptionTest.SubscriptionConstructorTest threw exception: NHibernate.MappingException: No persister no persister for for: [PROJECTLIB].SubscriptionManagerRP The class (then again, the same exception arises with a much simpler testclass - so the problem shouldn't be here): [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.4927")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://docs.oasis-open.org/wsn/b-2")] [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://docs.oasis-open.org/wsn/b-2", IsNullable = false)] [System.Runtime.Serialization.DataContractAttribute(Name = "SubscriptionManagerRP", Namespace = "http://docs.oasis-open.org/wsn/b-2")] public class SubscriptionManagerRP { private string id; public string Id { get { return id; } set { id = value; } } public Boolean Save() { DatabaseAccess access = new DatabaseAccess(); var sessionFactory = access.getSessionFactory(); //try //{ using (var session = sessionFactory.OpenSession()) { using (var transaction = session.BeginTransaction()) { SaveTextMess(this.ToString()); session.Save(this); transaction.Commit(); return true; } } //} //catch (Exception e) //{ // SaveTextMess("ERROR: " + e); // Console.WriteLine(e); //} //SaveTextMess("false"); return false; } private void SaveTextMess(String output) { //Just for Demo purposes, saving text file per message that should be sent // create a writer and open the file TextWriter tw = new StreamWriter("C:\\Temp\\CespSubscriptionManagerRPMessage.txt"); // write a line of text to the file tw.WriteLine(output); // close the stream tw.Close(); } //################################### [EditorBrowsable(EditorBrowsableState.Never)] private EndpointReferenceType c