예제 #1
0
        public bool Update(string Id, DmRiserOpT data)
        {
            var model = dbContext.DmRiserOpT.SingleOrDefault(x => x.RiserOpId == Id);

            if (model == null)
            {
                return(false);
            }
            model = data;
            dbContext.DmRiserOpT.Update(model);
            return(dbContext.SaveChanges() > 0);
        }
예제 #2
0
 public bool Create(DmRiserOpT data)
 {
     data.RiserOpId = NormalHelper.GenerateNormalKey();
     dbContext.DmRiserOpT.Add(data);
     return(dbContext.SaveChanges() > 0);
 }