Does not contain a definition for 'AsEnumerable' and 'cannot convert from methodgroup' in Razor view
<p>I'm getting an error which I can't find the solution to, it's that my model does not contain a definition for 'AsEnumerable' (I put the whole error lower in the post), I've read about it around Stack Overflow, all answers seem to point towards <code>using system.Linq</code> and <code>using system.Data</code>, but I have them in the code. </p>

<p>The program is supposed to take some data from tables: Contatti, Contacts and Companies which are at different locations and bring them together (which happen in the list of the GET method in the controller), the code is the following:</p>

<p>Model:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Globalization;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

 public partial class ContactsUni2
{
    public IEnumerable&lt;Contatti&gt; Contattis { get; set; }
    public IEnumerable&lt;Companies&gt; Companies { get; set; }
    public IEnumerable&lt;Contact&gt; Contacts { get; set; }
}
</code></pre>

<p>Controller GET Which Gives the error:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using ContactManager.Models;

namespace ContactManager.Controllers
{
public class ContactsUni21Controller : Controller
{
    private ApplicationDbContext db = new ApplicationDbContext();
    private ContattiDB2 db2 = new ContattiDB2();

    // GET: ContactsUni21
    public ActionResult Index(String Page)
    {
        ContactsUni2 CU = new ContactsUni2();
        CU.Contattis = db.Contattis.Include(i =&gt; i.ContattoID);
        CU.Contacts = db.Contacts;
        CU.Companies = db.Companies;
        List&lt;ContactsUni2&gt; contactlist = new List&lt;ContactsUni2&gt;();
        contactlist.Add(CU.AsEnumerable()); // The error is HERE at CU.AsEnumerable(), cannot convert from method group to 'contactsuni2'
        return View(contactlist);
    }
</code></pre>

<p>View, which also gives a similar error but for Contatti.Count()</p>

<pre><code>@model IEnumerable&lt;ContactManager.ViewModels.ContactsUni3&gt;

@{
ViewBag.Title = "Index";
}

&lt;h2&gt;Contacts Unified&lt;/h2&gt;

&lt;html&gt;
&lt;head&gt;
&lt;meta name="viewport" content="width=device-width" /&gt;
&lt;title&gt;Index&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;
    @Html.ActionLink("Create New", "Create")
&lt;/p&gt;
&lt;table class="table"&gt;
    &lt;tr&gt;
        &lt;th&gt;
            @Html.DisplayNameFor(model =&gt; model.Contatti.Nome)
            @Html.DisplayNameFor(model =&gt; model.Contatti.Citta)
            @Html.DisplayNameFor(model =&gt; model.Contatti.ContattoID)
            @Html.DisplayNameFor(model =&gt; model.Contatti.CodicePostale)
            @Html.DisplayNameFor(model =&gt; model.Contatti.Email)
            @Html.DisplayNameFor(model =&gt; model.Contact.Address)
            @Html.DisplayNameFor(model =&gt; model.Contact.CompanyId)
            @Html.DisplayNameFor(model =&gt; model.Contact.ContactId)
            @Html.DisplayNameFor(model =&gt; model.Company.CompanyName)

        &lt;/th&gt;
        &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;

    @foreach (var item in Model)
    {
        for (int i = 0; i &lt; @item.Contatti.Count(); i++) // Second Error Here
        {
            &lt;tr&gt;
                &lt;td&gt;
                    @item.Contatti[i].Nome
                    @item.Contatti[i].Citta
                    @item.Contatti[i].ContattoID
                    @item.Contatti[i].CodicePostale
                    @item.Contatti[i].Email
                    @item.Contatti[i].Address
                    @item.Contatti[i].CompanyId
                    @item.Contatti[i].ContactId
                    @item.Contatti[i].CompanyName

                &lt;/td&gt;
                &lt;td&gt;
                    @Html.ActionLink("Edit", "Edit", new { id = item.ContattoID }) |
                    @Html.ActionLink("Details", "Details", new { id = item.ContattoID }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.ContattoID })
                &lt;/td&gt;
            &lt;/tr&gt;
        }
    }

&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>First error in Controller GET Method:</p>

<blockquote>
  <p>Error CS1929  'ContactsUni2' does not contain a definition for 'AsEnumerable' and the best extension method overload 'DataTableExtensions.AsEnumerable(DataTable)' requires a receiver of type 'DataTable'</p>
</blockquote>

<p>when I try doing that, it says:</p>

<blockquote>
  <p>cannot convert from method group to 'contactsuni2'</p>
</blockquote>

<p>Second Error in View loop:</p>

<blockquote>
  <p>Error CS1061  'Contatti' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'Contatti' could be found (are you missing a using directive or an assembly reference?)</p>
</blockquote>