Solved

public DbSet<Course> Courses { get; set; }

Posted on 2014-04-02
1
281 Views
Last Modified: 2014-04-02
Trying to understand what this really mean in MVC

 public DbSet<Course> Courses { get; set; }

I'm guessing DbSet<Course> refer to the class and Courses is the entities of the class right
0
Comment
Question by:yguyon28
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39973303
Per the documentation:

A DbSet represents the collection of all entities in the context, or that can be queried from the database, of a given type.

So, the context more or less represents your database, and the DbSet is a container for entities you retrieve from the context. Course is a class that is most likely defined with the same columns (and data types) found in that table in the database. An instance of Course is considered to be an entity.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question