title: mvc cannot call view from controller
body: <p>I am trying to get started learning MVC. I built the MVC Music Store project that I found on the Microsoft site. <a href="http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1" rel="nofollow">http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1</a>.</p>
  
  <p>I got it working pretty well but I ran into trouble when I tried to modified it. I want to put the data in a separate project. I used Linq to Entities for the data access. </p>
  
  <p>Here is my class to access the data</p>
  
  <pre><code>public class clsUtilities
  {
      Utilities.MVCMusicStoreEntities db = new Utilities.MVCMusicStoreEntities();
  
      public object GetAlbums(string GenreName)
      {
          var query = from tags in db.vieAlbumArtists
                      where tags.GenreName.Equals(GenreName)
                      select tags;
  
          return query;
      }
  }
  </code></pre>
  
  <p>In my Controller my code is</p>
  
  <pre><code>public ActionResult Browse2(string genre)
  {
      // retrieve Genre and its associated albums from the database
  
      var genreModel = mcloUtilities.GetAlbums(genre);
  
      return View(genreModel);
  }
  </code></pre>
  
  <p>I generate a cshtml file in my view</p>
  
  <pre><code>@model Utilities.vieAlbumArtist
  
  @{
      ViewBag.Title = "Browse2";
  }
  </code></pre>
  
  <p>This all compiles ok but when I run it I get:</p>
  
  <p>The model item passed into the dictionary is of type <code>System.Data.Objects.ObjectQuery'1[Utilities.vieAlbumArtist]</code>, but this dictionary requires a model item of type <code>Utilities.vieAlbumArtist</code>. </p>