public bool Update(string Id, CdWellboreFormationT data) { var model = dbContext.CdWellboreFormationT.SingleOrDefault(x => x.WellboreFormationId == Id); if (model == null) { return(false); } model = data; dbContext.CdWellboreFormationT.Update(model); return(dbContext.SaveChanges() > 0); }
public bool Create(CdWellboreFormationT data) { data.WellboreFormationId = NormalHelper.GenerateNormalKey(); dbContext.CdWellboreFormationT.Add(data); return(dbContext.SaveChanges() > 0); }