public void Delete(T entity) { InspectionProcessEntities context = CreateContext(); context.Entry(entity).State = EntityState.Deleted; context.SaveChanges(); }
public virtual void Insert(T entity) { InspectionProcessEntities context = CreateContext(); //context.Albums.Add(album); context.Entry(entity).State = EntityState.Added; context.SaveChanges(); }