public virtual void Delete(TEntity entityToDelete) { if (context.Entry(entityToDelete).State == EntityState.Detached) { dbSet.Attach(entityToDelete); } dbSet.Remove(entityToDelete); }
public void Update(UserModel user) { context.Entry(user).State = EntityState.Modified; }
public void Update(SubscriptionModel subscription) { context.Entry(subscription).State = EntityState.Modified; }