예제 #1
0
 public bool UpdateUser(User_details b)
 {
     if (b == null)
     {
         throw new ArgumentNullException("User is Empty");
     }
     db.Entry(b).State = EntityState.Modified;
     db.SaveChanges();
     return(true);
 }
예제 #2
0
 public User_details AddUser(User_details b)
 {
     if (b == null)
     {
         throw new NullReferenceException("User is null");
     }
     db.User_details.Add(b);
     db.SaveChanges();
     return(b);
 }