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); }
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); }