public ComponentSpecificationMinimal MapToBLL(ComponentSpecificationCreate bllComponentSpecification) { return(new ComponentSpecificationMinimal { Id = 0, ComponentId = bllComponentSpecification.ComponentId, SpecificationId = bllComponentSpecification.SpecificationId, Value = bllComponentSpecification.Value }); }
public async Task <ActionResult <ComponentSpecificationMinimal> > PostComponentSpecification( ComponentSpecificationCreate componentSpecification) { var bllEntity = _mapper.MapToBLL(componentSpecification); _bll.ComponentSpecifications.AddNoReturn(bllEntity); await _bll.SaveChangesAsync(); return(CreatedAtAction("GetComponentSpecification", new { id = bllEntity.Id }, componentSpecification)); }