public ComponentSpecificationMinimal MapToBLL(ComponentSpecificationEdit bllComponentSpecification) { return(new ComponentSpecificationMinimal { Id = bllComponentSpecification.Id, ComponentId = bllComponentSpecification.ComponentId, SpecificationId = bllComponentSpecification.SpecificationId, Value = bllComponentSpecification.Value }); }
public async Task <IActionResult> PutComponentSpecification(int id, ComponentSpecificationEdit componentSpecification) { if (id != componentSpecification.Id) { return(BadRequest()); } _bll.ComponentSpecifications.UpdateNoReturnAsync(_mapper.MapToBLL(componentSpecification)); await _bll.SaveChangesAsync(); return(NoContent()); }