Esempio n. 1
0
 public void Create(tblCatalogType oCatalogType)
 {
     try
     {
         using (var ctx = new CRUDSampleEntities())
         {
             ctx.tblCatalogTypes.Add(oCatalogType);
             ctx.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public void Update(tblCatalogType oCatalogType)
 {
     try
     {
         using (var ctx = new CRUDSampleEntities())
         {
             ctx.Entry(oCatalogType).State = EntityState.Modified;
             ctx.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }