Ejemplo n.º 1
0
 public ArtistMap()
 {
     Table("Artists");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id).Column("ArtistId");
     Map(x => x.Name);
     HasMany(x => x.Albums).Inverse().Cascade.All();
 }
Ejemplo n.º 2
0
        public CounterMap()
        {
            OptimisticLock.Dirty();
            DynamicUpdate();

            Id(x => x.Id).GeneratedBy.Identity().Unique();
            Map(x => x.NumberId).Not.Nullable();
            Map(x => x.Current).Not.Nullable().OptimisticLock();
            Map(x => x.Parameter1).Nullable();
        }
Ejemplo n.º 3
0
 public GenreMap()
 {
     Table("Genres");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id).Column("GenreId");
     Map(x => x.Name);
     Map(x => x.Description);
     HasMany(x => x.Albums).KeyColumn("GenreId").Inverse().Cascade.All();
 }
Ejemplo n.º 4
0
        public ErfassungsPeriodMapping()
        {
            MapTo(e => e.Name);
            MapTo(e => e.NetzErfassungsmodus, "NetzModus");
            MapTo(e => e.IsClosed, "IstAbgeschl").OptimisticLock();
            MapTo(e => e.Erfassungsjahr, "ErfJahr").OptimisticLock();

            OptimisticLock.Dirty();

            ReferencesTo(b => b.Mandant);
            DynamicUpdate();
        }
Ejemplo n.º 5
0
 public CartMap()
 {
     Table("Carts");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id, "RecordId");
     Map(x => x.CartId);
     Map(x => x.Count);
     Map(x => x.DateCreated);
     Map(x => x.AlbumId);
     References(x => x.Album, "AlbumId").Not.Insert().Not.Update();
 }
Ejemplo n.º 6
0
 public AlbumMap()
 {
     Table("Albums");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id, "AlbumId");
     Map(x => x.Title);
     Map(x => x.Price);
     Map(x => x.AlbumArtUrl);
     References(x => x.Genre, "GenreId");
     References(x => x.Artist, "ArtistId");
     HasMany <NHOrderDetail>(x => x.OrderDetails).KeyColumn("AlbumId");
 }
 public OrderDetialMap()
 {
     Table("OrderDetails");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id, "OrderDetailId");
     Map(x => x.Quantity);
     Map(x => x.UnitPrice);
     Map(x => x.AlbumId);
     Map(x => x.OrderId);
     References(x => x.Album, "AlbumId").Not.Insert().Not.Update();
     References(x => x.Order, "OrderId").Not.Insert().Not.Update();
 }
Ejemplo n.º 8
0
 public OrderMap()
 {
     Table("Orders");
     OptimisticLock.Dirty();
     DynamicUpdate();
     Id(x => x.Id, "OrderId");
     Map(x => x.OrderDate);
     Map(x => x.Username);
     Map(x => x.FirstName);
     Map(x => x.LastName);
     Map(x => x.Address);
     Map(x => x.City);
     Map(x => x.State);
     Map(x => x.PostalCode);
     Map(x => x.Country);
     Map(x => x.Phone);
     Map(x => x.Email);
     Map(x => x.Total);
     HasMany(x => x.OrderDetails).Inverse().Cascade.All();
 }