dbc.Entry(model).State = System.Data.EntityState.Modified bị Lỗi: the type or namespace name 'entitystate' does not exist in the namespace 'system.data' (are you missing an assembly reference ?) khi save update dữ liệu web asp.net mvc C# xuống cơ sở dữ liệu linq, sql server. Tự nhiên nó bị lỗi như vậy thì các bạn làm như sau: Cách 1: kiểm tra xem đã using nó chưa? usingSystem.Data; usingSystem.Data.Entity; Cách 2: chuyển đổi thêm Đổi từ: System.Data.EntityState.Modified; Sang: System.Data.Entity.EntityState.Modified; Cách 3: Kiểm tra lại web.config Mã: <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> Thành hoặc ngược lại Mã: <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> Cách 4: xem thêm ở trang Microsoft https://msdn.microsoft.com/en-us/library/system.data.entitystate.aspx