Exemplo n.º 1
0
        protected override void OnApiModelCreating(ApiModelBuilder modelBuilder)
        {
            modelBuilder.Entity <Order>()
            .HasNavigation(o => o.Lines);

            modelBuilder.Entity <OrderLine>()
            .HasNavigation(ol => ol.Product);

            modelBuilder.Entity <Product>()
            .Ignore(p => p.InventoryStockId);
        }
Exemplo n.º 2
0
        protected override void OnApiModelCreating(ApiModelBuilder modelBuilder)
        {
            modelBuilder.Entity <Order>()
            .HasNavigation(o => o.Lines);

            modelBuilder.Entity <OrderLine>()
            .HasNavigation(ol => ol.Product);

            modelBuilder.Entity <Product>()
            .Ignore(p => p.Stock)
            .Ignore(p => p.WholesalePrice);
        }
        protected override void OnApiModelCreating(ApiModelBuilder modelBuilder)
        {
            modelBuilder.Entity <Order>()
            .HasNavigation(o => o.Lines);

            modelBuilder.Entity <OrderLine>()
            .HasNavigation(ol => ol.Product);

            modelBuilder.Entity <Product>();

            modelBuilder.Entity <User>()
            .Ignore(u => u.Password);
        }