コード例 #1
0
 public void Add(User user)
 {
     try {
         _plugin.Create(user);
     } catch (System.Data.DuplicateNameException dne) {
         throw new System.Data.DuplicateNameException(dne.Message);
     }
 }
コード例 #2
0
 public void Add(User user)
 {
     try {
         GetByEmail(user.Email.ToString());
     } catch (UserAdapterNotFoundException) {
         try {
             _plugin.Create(user);
             return;
         } catch (Exception ex) {
             throw new UserAdapterException(ex.ToString());
         }
     }
     throw new UserAdapterDuplicateException("Email already exists.");
 }
コード例 #3
0
 public void Add(User user)
 {
     _plugin.Create(user);
 }