VS C# Data Model: CS1061: 'entity' does not contain a definition for 'tablename'

Viewed 4189

I'm getting error CS1061 on my ASP.NET web app.

'Entities' does not contain a definition for 'AspNetRoles' and no extension method 'AspNetRoles' accepting a first argument of type 'Entities' could be found (are you missing a using directive or an assembly reference?)

There are over 90 CS1061 error messages for all tables and actions (add, change, delete,get, etc), like below:

using EntityData.Model;
using EntityData.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityData.Actions
{
    public class AspNetRolesActions : BaseActions<AspNetRole>
    {
        public override void Add(AspNetRole t, Guid by)
        {
            ctx.AspNetRoles.Add(t);
            Save();
        }

Web app was working fine until I updated the data model to reflect the changes I made on the SQL DB. I tried cleaning and rebuilding to no avail.

If I revert the changes to the data model, I can run the app without a problem.. but then I cannot save data on the new field I created..

What could be happening?

2 Answers
Related