// IComputerTest public void InitializeDatabaseAsync(IComputer repo) { var sessionList = repo.GetAllComputers(); if (!sessionList.Any()) { repo.AddComputer(gettestsession("AAA")); } }
public IActionResult PostComputer([FromBody] Computer computer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } string result = icomputer.AddComputer(computer); return(Ok(result)); //return Ok("success"); //return CreatedAtAction("GetComputer", computer.ProcessorId); }