public void Delete(TEntity entityToDelete)
 {
     if (context.Entry(entityToDelete).State == EntityState.Detached)
     {
         dbSet.Attach(entityToDelete);
     }
     dbSet.Remove(entityToDelete);
 }
 public void UpdateThumbnail(Thumbnail t)
 {
     dc.Entry(t).State = EntityState.Modified;
 }