public void Add(User user) { try { _plugin.Create(user); } catch (System.Data.DuplicateNameException dne) { throw new System.Data.DuplicateNameException(dne.Message); } }
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."); }
public void Add(User user) { _plugin.Create(user); }