public ActionResult <GpuEntity> CreateGpu([FromBody] GpuEntity gpuForCreation) { if (database.Read <GpuEntity>(gpuForCreation.Id) == null) { return(UnprocessableEntity()); } database.Create <GpuEntity>(gpuForCreation); return(CreatedAtRoute("GetGpu", new { gpuId = gpuForCreation.Id }, gpuForCreation)); }
private void LoadGpu() { Gpu = _dataBase.LoadPart <GpuEntity>("Gpu", Computer.GpuId); }