public OperationResult Update(UpdatePROD_RELATEDITEMModel model) { var entity = PROD_RELATEDITEMList.First(t => t.ProductNo == model.ProductNo && t.RelatedID == model.RelatedID); entity.ProductNo = model.ProductNo; entity.RelatedID = model.RelatedID; entity.Ranking = model.Ranking; PROD_RELATEDITEMRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }