public async Task <ActionResult <ComponentTestMinimal> > PostComponentTest( ComponentTestCreate componentTest) { var bllEntity = _mapper.MapToBLL(componentTest); _bll.ComponentTests.AddNoReturn(bllEntity); await _bll.SaveChangesAsync(); return(CreatedAtAction("GetComponentTest", new { id = bllEntity.Id }, componentTest)); }
public ComponentTestMinimal MapToBLL(ComponentTestCreate bllComponentTest) { return(new ComponentTestMinimal { Id = 0, ComponentId = bllComponentTest.ComponentId, TestId = bllComponentTest.TestId, TestDate = bllComponentTest.TestDate, Value = bllComponentTest.Value }); }