Database Reference
In-Depth Information
providerName="System.Data.EntityClient" />
</connectionStrings>
In the MVCApp project, there will be models, views, and controllers to use the new EF
models. The different controllers for reading the different queues will be in the User-
Controller :
Looking at one of the controllers, Subscription , we will simply read the table using
the EF model and return it to the view when the controller is called:
public ActionResult Subscription()
{
List<MVCApp.DAL.Subscription> models = new
List<MVCApp.DAL.Subscription>();
using (var db = new nservicebusEntities())
{
var subscriptions = db.Subscriptions;
foreach (var subscription in subscriptions)
{
models.Add(subscription);
}
Search WWH ::




Custom Search