public ActionResult Index() { return(View(_computerService.GetAllComputers().Select(computer => new ComputerViewModel { Id = computer.ComputerId, Name = computer.Name, Room = computer.RoomNumber, IpAddress = IpAddressHelper.ConvertIpAddressToString(computer.IpAddress), NetworkAddress = IpAddressHelper.ConvertIpAddressToString(computer.NetworkAddress), NetworkMask = IpAddressHelper.ConvertIpAddressToString(computer.SubnetAddress) }).ToList())); }
public IActionResult GetAll() { return(Ok(_computerService.GetAllComputers())); }