public UserModel GetUser(string usernameOrEmail) { var user = userWarehouse.GetUserByName(usernameOrEmail); user = user ?? userWarehouse.GetUserByEmail(usernameOrEmail); var adapter = new UserAdapter(user); return adapter.UserModel; }
public UserModel GetByName(string username) { var adapter = new UserAdapter(userWarehouse.GetUserByName(username)); return adapter.UserModel; }
public UserModel GetUser(int id) { var adapter = new UserAdapter(userWarehouse.GetUser(id)); return adapter.UserModel; }
public UserModel GetByEmail(string email) { var adapter = new UserAdapter(userWarehouse.GetUserByEmail(email)); return adapter.UserModel; }