Solved

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

Posted on 2014-04-02
1
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

615 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