官术网_书友最值得收藏!

Working with the Post entity

In Chapter 1, Kickstart - Introduction to Entity Framework Core, even the Post model was discussed in detail, except we have a virtual Blog property, which is nothing but a navigational property:

    public partial class Post
{
public int Id { get; set; }
public int BlogId { get; set; }
public string Content { get; set; }
public DateTime PublishedDateTime { get; set; }
public string Title { get; set; }
public virtual Blog Blog { get; set; }
}

We have seen the differences between the model created manually in Chapter 1Kickstart - Introduction to Entity Framework Core, and the auto-generated models. Let's see how the database context configuration could be made generic rather than hardcoding the connection string inside the code.

主站蜘蛛池模板: 盐山县| 高清| 乌鲁木齐县| 钦州市| 三河市| 鲁山县| 南丹县| 彰化市| 庄浪县| 辽阳县| 上饶市| 乐安县| 偃师市| 平阴县| 南汇区| 抚顺市| 岱山县| 砀山县| 乡宁县| 襄垣县| 商南县| 且末县| 谢通门县| 昌宁县| 精河县| 隆昌县| 全南县| 张北县| 孝感市| 乌拉特后旗| 蒙阴县| 页游| 化州市| 盖州市| 聊城市| 平利县| 安达市| 贡嘎县| 佳木斯市| 兰溪市| 江津市|