Esempio n. 1
0
 public void Map(ITypeMappingConfigurator<Planet> map)
 {
     map.HasChildren(x => x.Moons,
                     x => x.Planet,
                     x => x.AsUriBaseType()
                           .ConstructedUsing(y => new Moon(y.Requires().Name, y.Parent<Planet>())),
                     x => x.Writable());
     map.ConstructedUsing(x => new Planet(x.Requires().Name, x.Parent<PlanetarySystem>()));
 }
Esempio n. 2
0
 public void Map(ITypeMappingConfigurator <Planet> map)
 {
     map.HasChildren(x => x.Moons,
                     x => x.Planet,
                     x => x.AsUriBaseType()
                     .ConstructedUsing(y => new Moon(y.Requires().Name, y.Parent <Planet>())),
                     x => x.Writable());
     map.ConstructedUsing(x => new Planet(x.Requires().Name, x.Parent <PlanetarySystem>()));
 }
Esempio n. 3
0
 public void Map(ITypeMappingConfigurator<Planet> map)
 {
     map.AsUriBaseType();
     map.HasChildren(x => x.Moons,
         x => x.Planet,
         x => x.AsUriBaseType()
             .AsChildResourceOf(y => y.Planet, y => y.Moons)
             .ConstructedUsing(y => new Moon(y.Requires().Name, y.Parent<Planet>())), x => x);
     map.AsChildResourceOf(x => x.PlanetarySystem, x => x.Planets)
         .ConstructedUsing(x => new Planet(x.Requires().Name, x.Parent<PlanetarySystem>()))
         .Include(x => x.Moons, o => o.Writable());
 }
Esempio n. 4
0
 public void Map(ITypeMappingConfigurator <HandledThing> map)
 {
     map
     .HasChildren(x => x.Children,
                  x => x.Parent,
                  t =>
     {
         return
         (t.ConstructedUsing(c => new HandledChild(c.Parent <HandledThing>()))
          .HandledBy <HandledThingsHandler>());
     },
                  o => o.ExposedAsRepository())
     .Include(x => x.ETag, o => o.AsEtag())
     .AsUriBaseType()
     .DeleteAllowed().HandledBy <HandledThingsHandler>();
 }
Esempio n. 5
0
 public void Map(ITypeMappingConfigurator<HandledThing> map)
 {
     map
         .HasChildren(x => x.Children,
                      x => x.Parent,
                      t =>
                      {
                          return
                              t.ConstructedUsing(c => new HandledChild(c.Parent<HandledThing>()))
                               .HandledBy<HandledThingsHandler>();
                      },
                      o => o.ExposedAsRepository())
         .Include(x => x.ETag, o => o.AsEtag())
         .AsUriBaseType()
         .DeleteAllowed().HandledBy<HandledThingsHandler>();
 }
Esempio n. 6
0
 public void Map(ITypeMappingConfigurator<Root> map)
 {
     map.AsUriBaseType();
     map.HasChildren(x => x.Peons, x => x.Root, o => o.Include(x => x.Name, y => y.AsPrimaryKey()).Exclude(x => x.Root));
 }
Esempio n. 7
0
 public void Map(ITypeMappingConfigurator <Root> map)
 {
     map.AsUriBaseType();
     map.HasChildren(x => x.Peons, x => x.Root, o => o.Include(x => x.Name, y => y.AsPrimaryKey()).Exclude(x => x.Root));
 }