Using Entity Framework and Devart Entity Developer on an existing database. I brought the table needed into the Entity Designer model using the wizard. Saved the model - that creates the underlying code for EF. Now when I try to use:
using (Document ctx = new Document())
{
}
I get the error:
CS1674 'Document': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
I have seen posts that suggest that state to make sure that Entity Framework is added as a NuGet package - it is. I have use Entity Designer before in this situation but did not run into this issue.
Any ideas?
Edit
Document:
public partial class Document : EntityObject {//...
EntityObject:
namespace System.Data.Entity.Core.Objects.DataClasses
{
/// <summary>
/// This is the class is the basis for all perscribed EntityObject classes.
/// </summary>
[DataContract(IsReference = true)]
[Serializable]
public abstract class EntityObject : StructuralObject, IEntityWithKey, IEntityWithChangeTracker, IEntityWithRelationships
{