Example #1
0
        public bool Update(string Id, CdWellSource data)
        {
            var model = dbContext.CdWellSource.SingleOrDefault(x => x.WellId == Id);

            if (model == null)
            {
                return(false);
            }
            model = data;
            dbContext.CdWellSource.Update(model);
            return(dbContext.SaveChanges() > 0);
        }
Example #2
0
 public bool Create(CdWellSource data)
 {
     data.WellId = NormalHelper.GenerateNormalKey();
     dbContext.CdWellSource.Add(data);
     return(dbContext.SaveChanges() > 0);
 }