google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

Fluent NHibernate-like mapping definition technique #378

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Example (from http://wiki.fluentnhibernate.org/Getting_started):

public class CatMap : ClassMap<Cat>
{
  public CatMap()
  {
    Id(x => x.Id);
    Map(x => x.Name)
      .Length(16)
      .Not.Nullable();
    Map(x => x.Sex);
    References(x => x.Mate);
    HasMany(x => x.Kittens);
  }
}

See also: http://code.google.com/p/dataobjectsdotnet/issues/detail?id=330

Original issue reported on code.google.com by Dmitri.Maximov on 7 Sep 2009 at 10:46

GoogleCodeExporter commented 9 years ago
Likely, this can be done by providing TypeDef<T> & few other *Def<T> types ;)

Original comment by alex.yakunin on 7 Sep 2009 at 11:50

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 13 Jan 2010 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 9 Feb 2010 at 1:58