public void Update(POFDMDTO POFDMDTO) { int ID = POFDMDTO.ID; POFODM pipeline = _unitOfWork.POFODM.FindById(ID); if (pipeline != null) { pipeline.PipeMasterID = POFDMDTO.PipeMasterID; pipeline.DMCode = POFDMDTO.DMCode; pipeline.DMName = POFDMDTO.DMName; pipeline.InitialSuceptability = POFDMDTO.InitialSuceptability; pipeline.IntialIndex = POFDMDTO.IntialIndex; pipeline.High = POFDMDTO.High; pipeline.Medium = POFDMDTO.Medium; pipeline.Low = POFDMDTO.Low; pipeline.Found = POFDMDTO.Found; pipeline.DamageReductionFactor = POFDMDTO.DamageReductionFactor; pipeline.DamageFactor = POFDMDTO.DamageFactor; pipeline.POF = POFDMDTO.POF; pipeline.LastYearVH = POFDMDTO.LastYearVH; pipeline.ModifiedBy = POFDMDTO.ModifiedBy; pipeline.ModifiedDate = DateTime.Now; } _unitOfWork.POFODM.Update(pipeline); _unitOfWork.SaveChanges(); }
public void Create(POFDMDTO POFDMDTO) { POFODM obj = _mapper.Map <POFODM>(POFDMDTO); obj.CreatedDate = DateTime.Now; _unitOfWork.POFODM.Create(obj); _unitOfWork.SaveChanges(); }