Mapping interface or abstract class component

前端 未结 4 2041
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 14:24

Please consider the following simple use case:

public class Foo 
{ 
    public virtual int Id { get; protected set; } 
    public virtual IBar Bar { get; set; }          


        
4条回答
  •  醉话见心
    2021-02-10 15:05

    Have not used the fluent NHibernate yet but seems to me what you are trying to do is map to an IUserType which you haven't told hibernate how to deal with. here is a useful example for defined usertypes in fluent.

    http://blog.jagregory.com/2009/01/11/fluent-nhibernate-auto-mapping-type-conventions/

提交回复
热议问题