Reacting to ConventionModelBuilder name change
This commit is contained in:
parent
e2736173e8
commit
9ee9104883
|
|
@ -21,7 +21,7 @@ namespace MusicStore.Models
|
||||||
public DbSet<CartItem> CartItems { get; set; }
|
public DbSet<CartItem> CartItems { get; set; }
|
||||||
public DbSet<OrderDetail> OrderDetails { get; set; }
|
public DbSet<OrderDetail> OrderDetails { get; set; }
|
||||||
|
|
||||||
protected override void OnModelCreating(ConventionModelBuilder builder)
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
{
|
{
|
||||||
// TODO: All this configuration needs to be done manually right now.
|
// TODO: All this configuration needs to be done manually right now.
|
||||||
// We can remove this once EF supports the conventions again.
|
// We can remove this once EF supports the conventions again.
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MusicStore.Models
|
||||||
public DbSet<CartItem> CartItems { get; set; }
|
public DbSet<CartItem> CartItems { get; set; }
|
||||||
public DbSet<OrderDetail> OrderDetails { get; set; }
|
public DbSet<OrderDetail> OrderDetails { get; set; }
|
||||||
|
|
||||||
protected override void OnModelCreating(ConventionModelBuilder builder)
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
{
|
{
|
||||||
builder.Entity<Album>().Key(a => a.AlbumId);
|
builder.Entity<Album>().Key(a => a.AlbumId);
|
||||||
builder.Entity<Artist>().Key(a => a.ArtistId);
|
builder.Entity<Artist>().Key(a => a.ArtistId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue