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

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