public IActionResult Update(string id, TrashIssue TrashIssueIn) { var TrashIssue = _TrashServices.Get(id); if (TrashIssue == null) { return(NotFound()); } _TrashServices.Update(id, TrashIssueIn); return(NoContent()); }
public ActionResult <TrashIssue> Create(TrashIssue TrashIssue) { _TrashServices.Create(TrashIssue); return(CreatedAtRoute("GetTrashIssue", new { id = TrashIssue.Id.ToString() }, TrashIssue)); }
public void Update(string id, TrashIssue issueIn) => _tissue.ReplaceOne(issue => issue.Id == id, issueIn);
public void Remove(TrashIssue issueIn) => _tissue.DeleteOne(issue => issue.Id == issueIn.Id);
public TrashIssue Create(TrashIssue issue) { _tissue.InsertOne(issue); return(issue); }