public void Update(T entity)
{
if (entity == null)
throw new ArgumentNullException("entity");
//if (!this._context.IsAttached(entity))
// this._entities.Attach(entity);
this._context.SaveChanges();
}
public void Delete(T entity)
{
if (entity == null)
throw new ArgumentNullException("entity");
//if (!this._context.IsAttached(entity))
// this._entities.Attach(entity);
this._entities.Remove(entity);
this._context.SaveChanges();
}