Пример #1
0
        public IActionResult Update(string id, TrashIssue TrashIssueIn)
        {
            var TrashIssue = _TrashServices.Get(id);

            if (TrashIssue == null)
            {
                return(NotFound());
            }

            _TrashServices.Update(id, TrashIssueIn);

            return(NoContent());
        }
Пример #2
0
        public ActionResult <TrashIssue> Create(TrashIssue TrashIssue)
        {
            _TrashServices.Create(TrashIssue);

            return(CreatedAtRoute("GetTrashIssue", new { id = TrashIssue.Id.ToString() }, TrashIssue));
        }
Пример #3
0
 public void Update(string id, TrashIssue issueIn) =>
 _tissue.ReplaceOne(issue => issue.Id == id, issueIn);
Пример #4
0
 public void Remove(TrashIssue issueIn) =>
 _tissue.DeleteOne(issue => issue.Id == issueIn.Id);
Пример #5
0
 public TrashIssue Create(TrashIssue issue)
 {
     _tissue.InsertOne(issue);
     return(issue);
 }