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 IEnumerable <Profile> Post([FromBody] Profile value) { profileRepo.Create(value); return(profileRepo.GetAll()); }
public IEnumerable <Jam> Post([FromBody] Jam value) { jamRepo.Create(value); return(jamRepo.GetAll()); }