public IEnumerable <ProfileJam> Delete(int jamId, int profileId) { ProfileJam profilejam = profileJamRepo.GetAll().FirstOrDefault(x => x.JamID == jamId && x.ProfileID == profileId); profileJamRepo.Delete(profilejam); return(profileJamRepo.GetAll().Where(x => x.JamID == jamId)); }
public IEnumerable <ProfileJam> Delete(int id) { ProfileJam profilejam = profileJamRepo.GetById(id); profileJamRepo.Delete(profilejam); return(profileJamRepo.GetAll()); }
public IEnumerable <ProfileJam> Post([FromBody] ProfileJam value) { int existingItemCount = profileJamRepo.GetAll().Count(x => x.JamID == value.JamID && x.ProfileID == value.ProfileID); bool alreadyExists = existingItemCount > 0; if (!alreadyExists) { profileJamRepo.Create(value); } return(profileJamRepo.GetAll().Where(x => x.JamID == value.JamID)); }
public ProfileJam Put([FromBody] ProfileJam inputValue) { profileJamRepo.Update(inputValue); return(profileJamRepo.GetAll().FirstOrDefault(x => x.JamID == inputValue.JamID && x.ProfileID == inputValue.ProfileID)); }
public ProfileJam Get(int id) { ProfileJam jamAttendees = profileJamRepo.GetById(id); return(jamAttendees); }