25. (ASP.NET Core 1.0 & MVC) Entity Framework Core - Defining Table And Class Relationships

preview_player
Показать описание
This Configuring Our Context video is part of the ASP.NET Core 1.0 beginner programming tutorial course hosted by Steve Bishop, and covers using the OnModelCreating method to configure the database schema, navigation properties on your classes, and the relationships between your tables. The ASP.NET Core 1.0 beginner course is a free .NET tutorial series that helps beginning programmers learn the basics of ASP.NET Core 1.0. These free ASP.NET Core programming tutorials cover a variety of basic topics such as downloading and installing ASP.NET Core, setup and configuration of ASP.NET Core, the MVC architecture, Razor View engine, ASP.NET Identity, Entity Framework 7.0, and other topics. After watching this beginner series on ASP.NET Core 1.0, you should be able to create your own website or web application.

Рекомендации по теме
Комментарии
Автор

It's a great tutorial because much of the Entity Framework Core stuff on the Internet is a little outdated and doesn't cover modelBuilder methods of changing database schemas or even mention of the overrideable OnModelCreating method on the DbContext base class. So kudos to Steve for doing the leg work in finding the most current methods of working with EF Core and highlighting some of the 'pain points' we might encounter as newcomers trying to make sense of things while 'breaking changes' in ASP.NET happen around us :)

dazecm
Автор

tnx a lot for such a good illustration, very very good explanation

vahekhachatryan
Автор

awesome tutorial... one query - if i wanted to add model only for stored procedure(SP) then? want to implement CURD using SP?

jagsfromindia
Автор

The Tutorials are just great help for the ASP.NET Core MVC beginners.

My question is that can we update Databases and Models using Code First/Database First during project developments or we have to stick to one of the approaches. And if we can, please refer to any helping material in this regard.
I have personally tried this but the error like the object already exists or similar errors occur in trying to achieve the goal.

SyedKumailHaiderNaqvi
Автор

So we have two ways to configure the database schema? One using code attributes in the class and the other by using the modelBuilder class? Is this modelBuilder way of doing things also called 'fluent api', which I've heard occasionally but never quite grasped,  in the context of code first database programming? I assume it provides more functionality that what is available purely by using code attributes?

dazecm
Автор

Great tutorial but I prefer a demonstration creating from beginning the database with small examples ...

vasilistsoulis
Автор

Great video, but you forget one-to-one relationship

ashrafmaher