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