public async Task <IActionResult> PutProfesionallsProfile(string id, ProfesionallsProfile profesionallsProfile) { if (id != profesionallsProfile.UserId) { return(BadRequest()); } _context.Entry(profesionallsProfile).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProfesionallsProfileExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMessages(Guid id, Messages messages) { if (id != messages.MessageId) { return(BadRequest()); } _context.Entry(messages).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MessagesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPostVideo(Guid id, PostVideo postVideo) { if (id != postVideo.Id) { return(BadRequest()); } _context.Entry(postVideo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PostVideoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutCliente(int id, Cliente cliente) { if (id != cliente.Id) { return(BadRequest()); } _context.Entry(cliente).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClienteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutEventGroups(Guid id, EventGroups eventGroups) { if (id != eventGroups.Id) { return(BadRequest()); } _context.Entry(eventGroups).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EventGroupsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTutorialPromoPhoto(Guid id, TutorialPromoPhoto tutorialPromoPhoto) { if (id != tutorialPromoPhoto.Id) { return(BadRequest()); } _context.Entry(tutorialPromoPhoto).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TutorialPromoPhotoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUserCattegory(Guid id, UserCattegory userCattegory) { if (id != userCattegory.Id) { return(BadRequest()); } _context.Entry(userCattegory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserCattegoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGoupMediaLink(Guid id, GoupMediaLink goupMediaLink) { if (id != goupMediaLink.Id) { return(BadRequest()); } _context.Entry(goupMediaLink).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GoupMediaLinkExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutInstalacao(int id, Instalacao instalacao) { if (id != instalacao.Id) { return(BadRequest()); } _context.Entry(instalacao).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InstalacaoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutGroupUser(Guid id, GroupUser groupUser) { if (id != groupUser.Groupid) { return(BadRequest()); } _context.Entry(groupUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GroupUserExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFollowings(string id, Followings followings) { if (id != followings.Followers) { return(BadRequest()); } _context.Entry(followings).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FollowingsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void Put(int id, [FromBody] AdventureImage adventureImage) { adventureImage.Id = id; adventureDB.Entry(adventureImage).State = EntityState.Modified; adventureDB.SaveChanges(); }
public void Put(int id, [FromBody] Campaign campaign) { campaign.Id = id; campaignDB.Entry(campaign).State = EntityState.Modified; campaignDB.SaveChanges(); }
public void Put(int id, [FromBody] Comment comment) { comment.Id = id; commentDB.Entry(comment).State = EntityState.Modified; commentDB.SaveChanges(); }