Written by


  1. Written by Vladimir

    Interesting stuff. A Document DB indeed simplifies the composition, no need to worry about decomposing an aggregate into several tables which you often have to do when working with a relational database.

    Regarding mapping Customer.MaybeBillingAddress. NHibernate’s documentation lacks information in a lot of places, that’s for sure. You can do this mapping with something like this:

    class Customer
    private Address _address;
    public virtual Maybe Address
    get { return _address; }
    protected set { _address = value.Unwrap(); }

    class CustomerMap
    Component(x => x.Address, y =>
    y.Map(x => x.Street).Nullable();
    y.Map(x => x.Number).Nullable();
    y.Map(x => x.City).Nullable();


Leave a Comment:

Your email address will not be published. Required fields are marked *