You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Employee
{
public virtual string Name { get; set; }
public virtual long Id { get; set; }
}
public class EmployeeMap : ClassMap<Employee>
{
public EmployeeMap()
{
Table("employee");
Id(e => e.Id).CustomSqlType("Serial").GeneratedBy.Native();
Map(e => e.Name).Column("name");
}
}
Error:
NHibernate.InvalidProxyTypeException: The following types may not be used as proxies:
TodoAPI.Models.Employee: method MemberwiseClone should be 'public/protected virtual' or 'protected internal virtual'
at NHibernate.Cfg.Configuration.ValidateEntities()
at NHibernate.Cfg.Configuration.Validate()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
The text was updated successfully, but these errors were encountered:
Dotnet Version: 9.0.100-preview.7.24407.12
Fluent-NHibernate Version: 3.4.0
Code Used
Error:
The text was updated successfully, but these errors were encountered: