public async Task <SiteSetting> Set(SiteSetting siteSetting) { var entity = await _db.SiteSettings.FindAsync(siteSetting.Id); _db.Entry(entity).CurrentValues.SetValues(siteSetting); await _db.SaveChangesAsync(); return(entity); }
public async Task Update(Cart cart) { _db.Entry(cart).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task Update(Product product) { _db.Entry(product).State = EntityState.Modified; await _db.SaveChangesAsync(); }