public async Task <ActionResult <ComputerModel> > GetComputer(Guid id)
        {
            if (id == Guid.Empty)
            {
                return(BadRequest());
            }

            var computer = await _computerService.Get(id);

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

            return(computer);
        }
Beispiel #2
0
        public ActionResult Form(int id)
        {
            var computer = _service.Get(id);

            return(View(computer));
        }