예제 #1
0
 public static void SaveMessage(Message message)
 {
     using (var context = new MessageDBContext())
     {
         context.Entry(message).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
예제 #2
0
 public static void AddUser(User user)
 {
     using (var context = new MessageDBContext())
     {
         context.Users.Add(user);
         context.SaveChanges();
     }
 }