Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
error: Namespace name 'EntityState' does not exist
Mani Kandan
Sep 2 2016 3:37 AM
953
Reply
Hello,
I have a error:
The type or namespace name 'EntityState' does not exist in the namespace 'System.Data.Entity'
But, I have added reference System.Data. Kindly answer me.
using DAL.Model;
using System;
using System.Collections.Generic;
//using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
namespace DMS.GenericRepository
{
public class GenericRepository<TEntity> where TEntity : class
{
internal DbSet<TEntity> dbSet;
public virtual void Update(TEntity entityToUpdate)
{
dbSet.Attach(entityToUpdate);
context.Entry(entityToUpdate).State = System.Data.Entity.EntityState.Modified;
}
}
}
Thanks Advance.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to pass mutiple city id in sql query
Interfaces with Libraries