I am trying to delete an object in my ASP.NET MVC3 / Code-first Entity Framework application, but I do not have the required parameters, because it causes a "does not contain a definition for DeleteObject" error. Does anyone know if I am missing a build reference. Here is my repository code:
private dbContext db = new dbContext(); public void DeleteAccessDetails(AccessDetails details) { db.DeleteObject(details);
Here are my links:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using MySite.Models; using System.Data; using System.Data.Objects; using System.Web.Mvc; using System.Data.Entity;
I thought that for System.Data.Entity it would be enough to call DeleteObject, but intellisense hardly brings up any parameters - only Dispose, Entry, SaveChanges and Set
Edit: Here is also my code to access the repository:
Repository rep = new Repository(); AccessDetails paymentUpdate = rep.GetPaymentByID(item.AccessDetailsTableID); rep.DeleteAccessDetails(paymentUpdate);
Edit 2: Here is an image of a folder with my links:

thanks
source share