Click here to Skip to main content
15,881,413 members
Articles / Programming Languages / C#

Forums application using MVC4 and Entity Framework

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
15 Feb 2013CPOL7 min read 421.8K   2.9K   24  
I would like to share the application which is done in MVC4 using Entity Framework.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace mvcForumapp.Controllers
{
    public class TechnologyController : Controller
    {
        //
        // GET: /Technology/
        newForumDBEntities db = new newForumDBEntities();

        public ActionResult Index()
        {
            List<mvcForumapp.TechResult_Result> userview = db.TechResult().ToList();
            return View(userview);
        }

        public ActionResult DisplayQuestions()
        {
            int TechID = Convert.ToInt16(Request.QueryString["TechID"].ToString());

            List<mvcForumapp.QuestionList_Result> disp = db.QuestionList(TechID).ToList();
            return View(disp);

        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
I am working as a Software engineer. Web development in Asp.Net with C#, WinForms and MS sql server are the experience tools that I have had for the past 3 years. Yet to work on WCF, WPF, Silverlight and other latest ones.

Comments and Discussions