Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8013943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:46:50+00:00 2026-06-04T19:46:50+00:00

Hello guys wanna ask help because I don’t understand how to create database that

  • 0

Hello guys wanna ask help because I don’t understand how to create database that I can use using MASSIVE.CS in ASP.NET MVC 3.

Im stuck in figuring out how I can implement this MASSIVE class to my MVC project and how connection string connects in northwind database. I only have this tutorial https://github.com/robconery/massive but I’m still having problems understanding.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MovieMassive.Models;

namespace MovieMassive.Controllers
{
    public class MoviesController : Controller
    {

        MovieTable dbMovies = new MovieTable();

        public ActionResult Index()
        {
            dbMovies.Query("SELECT * FROM MovieTable");
            return View(dbMovies);
        }

        public ActionResult Add() {
            return View();
        }
    }
}

Connection string:

<add name="MyConnectionString" connectionString="data source=|DataDirectory|MyDatabase.sdf"  providerName="System.Data.SqlServerCe.4.0"/>

MovieTable Class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Massive;

namespace MovieMassive.Models
{
    public class MovieTable : DynamicModel
    {
        public MovieTable() : base("movieMassive", "MovieTable", "ID") { }
    }
}

Okay here’s what I want, Can you help me how to run correctly the View Index.cshtml. The properties are not there yet. because don’t know hot to implement it with database… Any help will be greatly appreciated..

@model IEnumerable<MovieMassive.Models.MovieTable>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<table>
    <tr>
        <th>Title</th>
        <th>ReleaseDate</th>
        <th>Genre</th>
        <th>Price</th>
        <th>Rating</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ReleaseDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Genre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>

I need this one to run correctly to create a basic CRUD using massive. Thanks in advance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:46:51+00:00Added an answer on June 4, 2026 at 7:46 pm

    Update to OP comment after code was updated into question

    Jed, change your MoviesController to this

    public class MoviesController : Controller
    {
        public ActionResult Index()
        {
            MovieTable dbMovies = new MovieTable();
            dbMovies.All();
            return View(dbMovies);
        }
        ...
    }
    

    Visit TekPub.com, watch the MVC 2 vids (because they’re free) as Rob Conery shows you how to implement the Massive file into an MVC app

    Here’s the direct link

    ASP.NET MVC Concepts – free

    Rob’s Massive.cs file is basically an ORM (Object Relational Mapping) tool that queries your datastore for tables and uses them as objects in your application.

    Implementing it is easy. You need:

    • ConnectionString in your web.config that points to your database. Here’s a sample SQL connection string:

      <connectionStrings>
          <add name="MyConnectionString" 
               connectionString="Data Source=DNSServerName;Initial Catalog=DatabaseName;user id=Username;password=Password" 
               providerName="System.Data.SqlClient" />
      </connectionStrings>
      

    If you are using something other than MS SQL you can visit connectionstrings.com for your specific platform

    • Drop the Massive.cs file downloaded from GitHub into your application. How your solution is divided will make a difference as to where you add the file. If you are using only one project in your ASP.NET MVC app then you can just add it into the project root, or create a folder for it. Rob uses a folder called Infrastructure if I remember correctly.

    NOTE – most real world applications are comprised of a UI project, a business logic layer and a data access layer. If you are using an N-Tier solution like this, then the Massive.cs file should go into your DAL.

    • Your ready to go, that’s all there is to implementing Massive!

    Usage

    To use massive in your app just do something like this:
    I’m using a simple example of a single project MVC app and not separating layers.

    public ActionResult Index() {
        var table = new Products();
        var products = table.All();
        return View(products);
    }
    

    Again, this is not the strictest usage. You should learn all about using the MVC pattern and how to structure your solution/application into the correct design. Normally you would use a ViewModel that had properties of Product and then you would map the products returned from the Massive call to table.All(); to your ViewModel

    This was a simple crash course, hope it helps someone 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello guys I have a confusing question! If I'm using WCF to create a
hello guys i am doing some database operations in iphone .. please can anyone
hello guys i need to use pure SQL queries for my database project at
Hello guys can you please help me with this problem. When a simple image
Hello guys maybe you maybe can help . here is my problem For example
Hello guys I need to pass a string array over to a setter that
Hello guys Im using advance notification manager this is the code Notification note =
Hello guys Im trying to set a max width and height so that when
Hello guys i have an website online wich access the database. The database access
Hello guys on my blog I use this script: jQuery(document).ready(function () { jQuery(.postbox).hover(function ()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.