public async Task <bool> UpdatePricePerPeople(PricePerPeople pricePerPeople) { _context.Entry(await _context.PricePerPeople.FirstOrDefaultAsync(c => c.PricePerPeopleId == pricePerPeople.PricePerPeopleId)).CurrentValues.SetValues(pricePerPeople); if (await _context.SaveChangesAsync() > 0) { return(true); } return(false); }
public async Task <bool> AddPricePerPeople(PricePerPeople pricePerPeople) { await _context.AddAsync(pricePerPeople); if (await _context.SaveChangesAsync() > 0) { return(true); } return(false); }