Ejemplo n.º 1
0
        public static @class Casting(common.Class1 t)
        {
            @class @class = new @class()
            {
                codeClass = t.CodeClass,
                name      = t.Name
            };

            return(@class);
        }
 public static void Update(common.Class1 class1)
 {
     using (sqlEntities sqlEntities = new sqlEntities())
     {
         var s = [email protected](z => z.codeClass == class1.CodeClass).First();
         try
         {
             s.name = class1.Name;
             sqlEntities.SaveChanges();
         }
         catch { }
     }
 }