Example #1
0
 public static void Create(T_User user)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             bdd.T_User.Add(user);
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }
Example #2
0
 public static void Update(long userId, T_User usr)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             T_User user = Get(userId);
             user = usr;
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }